Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is no way to exclude module-info.java by package name. That is why when one is in legacyMode, one enters the file-based mode in order to be able to exclude them. Adding -sourcepath in this case simply causes the javadoc to consider the module-info.java files again. With the javadoc:aggregate goal, this ends up in error.
This PR intents to cater for the problem in #1243 but still keep the #1217 intention intact. When in legacyMode and the excludePackageNames is specified, we have no choice but to add the -sourcepath. Because in the file-based mode, the files corresponding to the excluded package names will not be listed and might cause unresolved symbols. But in all other cases, the -sourcepath should not be needed.
All the integration tests are passing with this change, even the one that was introduced by #1243 . I verified that the generated javadoc and the
javadoc.sh
,argfile
andoption
files are identical in both cases.