Skip to content

Commit

Permalink
Obey method contract
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Aug 27, 2024
1 parent 8c19098 commit d250780
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -780,12 +780,16 @@ protected static void invokeMaven(
InvocationRequest request = new DefaultInvocationRequest();
request.setBaseDirectory(projectFile.getParentFile());
request.setPomFile(projectFile);
request.setGlobalSettingsFile(globalSettingsFile);
if (userSettingsFile.isFile()) {
if (globalSettingsFile != null && globalSettingsFile.isFile()) {
request.setGlobalSettingsFile(globalSettingsFile);
}
if (userSettingsFile != null && userSettingsFile.isFile()) {
request.setUserSettingsFile(userSettingsFile);
}
request.setGlobalToolchainsFile(globalToolchainsFile);
if (userToolchainsFile.isFile()) {
if (globalToolchainsFile != null && globalToolchainsFile.isFile()) {
request.setGlobalToolchainsFile(globalToolchainsFile);
}
if (userToolchainsFile != null && userToolchainsFile.isFile()) {
request.setToolchainsFile(userToolchainsFile);
}
request.setBatchMode(true);
Expand Down

0 comments on commit d250780

Please sign in to comment.