arturobernalg opened a new pull request, #1455:
URL: https://github.com/apache/maven-javadoc-plugin/pull/1455

   Fixes #1118.
   
   getClassesFile() returns the configured outputDirectory even when it does 
not exist on disk yet, e.g. when the javadoc goal runs directly without a prior 
compile (its forked execution only reaches generate-sources, never compile). 
The module-descriptor resolution loop treated that non-null but absent path as 
authoritative and never tried the source-based fallback, so a project with a 
real module-info.java got misclassified as unnamed and the whole report failed 
with "Creating an aggregated report for both named and unnamed modules is not 
possible."
   
   The fix only trusts the artifact-based resolution when the directory 
actually exists, and falls through to scanning module-info.java in source 
whenever that attempt didn't yield a module descriptor. It also populates the 
synthetic module-source-path stub with that real module-info.java in the 
source-fallback case, since otherwise javadoc can't discover the module by name 
even though patch-module supplies its real sources.
   
   Added a new IT (MJAVADOC-736_clean-before-javadoc) that runs javadoc:javadoc 
directly on a fresh module project with no prior compile, and verified it fails 
on master and passes with the fix.
   
   To make clear that you license your contribution under the Apache License 
Version 2.0, January 2004 (https://www.apache.org/licenses/LICENSE-2.0) check 
one of the following:
   - [x] I hereby declare this contribution to be licensed under the Apache 
License Version 2.0, January 2004
   - [x] I hereby declare that I have filed an Apache Individual Contributor 
License Agreement.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to