hgschmie commented on PR #227: URL: https://github.com/apache/maven-javadoc-plugin/pull/227#issuecomment-1709250741
I am not sure that the behavior that you are observing is related to this PR. With the current release (3.5.0): When running "clean javadoc:javadoc", the javadoc plugin will consider your project to not use modules (the whole "automatic module name" thing is broken/iffy. JPMS itself only considers two different things: modules (which have a module-info.java) and "everything else". Maven tries to differentiate between modules, "things that have an automatic module name set" and "things that use filename based module names" which is IMHO wrong). Anyway, in my project, if I use "clean javadoc:javadoc", this is what gets executed: ``` -classpath <... all the jars ...> -encoding 'UTF-8' -public -quiet --release 11 -sourcepath <... all the source folders ...> ... all the other stuff ``` however, when I run "clean package javadoc:javadoc", the javadoc plugin will see the jar which now contains a META-INF/MANIFEST.MF with an automatic module name and consider this project to be modularized (which is IMHO wrong but this is for another day to discuss) and executes ``` --add-modules ALL-MODULE-PATH --module-path <the project jar>:<... all the jars that are either real modules or have an automatic module name...> --patch-module <module-identifier>=<... all the source folders ...>:<... all the jars that are filename based modules ...> ... all the other stuff ... ``` In your case, the second one succeeds and the first one fails. What the patch does is that only "real" modules (the ones with a module descriptor) end up on the module path and everything else ends up being patched. e.g. for my project, this is how javadoc is called without the patch: ``` --add-modules ALL-MODULE-PATH --module-path '/Users/henning/.m2/repository/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar: \ /Users/henning/.m2/repository/io/leangen/geantyref/geantyref/1.3.14/geantyref-1.3.14.jar: \ /Users/henning/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar: \ /Users/henning/.m2/repository/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar: \ /Users/henning/.m2/repository/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar: \ /Users/henning/.m2/repository/org/immutables/value/2.9.3/value-2.9.3.jar: \ /Users/henning/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar: \ /Users/henning/code/jdbi/core/target/jdbi3-core-3.41.1-SNAPSHOT.jar' --patch-module org.jdbi.v3.core='/Users/henning/code/jdbi/core/src/main/java: \ /Users/henning/code/jdbi/core/target/generated-sources/antlr4: \ /Users/henning/code/jdbi/core/target/generated-sources/annotations: \ /Users/henning/.m2/repository/org/inferred/freebuilder/2.8.0/freebuilder-2.8.0.jar' ``` and with the patch: ``` --add-modules ALL-MODULE-PATH --module-path '/Users/henning/code/jdbi/core/target/jdbi3-core-3.41.1-SNAPSHOT.jar: \ /Users/henning/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar' --patch-module org.jdbi.v3.core='/Users/henning/code/jdbi/core/src/main/java: \ /Users/henning/code/jdbi/core/target/generated-sources/antlr4: \ /Users/henning/code/jdbi/core/target/generated-sources/annotations: \ /Users/henning/.m2/repository/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar: \ /Users/henning/.m2/repository/io/leangen/geantyref/geantyref/1.3.14/geantyref-1.3.14.jar: \ /Users/henning/.m2/repository/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar: \ /Users/henning/.m2/repository/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar: \ /Users/henning/.m2/repository/org/immutables/value/2.9.3/value-2.9.3.jar: \ /Users/henning/.m2/repository/org/inferred/freebuilder/2.8.0/freebuilder-2.8.0.jar: \ /Users/henning/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar' ``` which may or may not make a difference in your case. But I am fairly certain that the failure that you observe with `clean javadoc:javadoc` vs. `clean package javadoc:javadoc` is caused by one not using modules at all and the other one is using the module path. If you run the javadoc process with the `<debug>` flag set to true and share your `options` file from the `target/apidocs` folder, I can take a look and say more. Also, the actual error message would be helpful. -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org