Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4
-
Fix Version/s: 2.5
-
Labels:None
-
Environment:Maven 2.0.8, JDK 1.5.0_12, WinXP
-
Number of attachments :
Description
The fix applied for MJAVADOC-145 causes the plugin to loose source roots that get created during the generate-sources build phase. I.e. if one runs
mvn org.apache.maven.plugins:maven-javadoc-plugin:2.3:javadoc
the plugin properly documents generated source code but running
mvn org.apache.maven.plugins:maven-javadoc-plugin:2.4-SNAPSHOT:javadoc
only documents the default source root "src/main/java".
Usually, I would expect to have the JavadocReport mojo @execute phase="generate-sources" and the TestJavadocReport mojo to have @execute phase="generate-test-sources" (although it's kind of ugly to have the compile phase being run in the later case).
In lack of these annotations, the plugin produces different output when run directly from the command line or indirectly as part of build.
Issue Links
- is duplicated by
-
MJAVADOC-186
Multimodule javadoc aggregate fails when submodule depends on generate-sources phase being executed
-
- is related to
-
MJAVADOC-145
If Javadoc is set to aggregate, the build fails inside a Maven plugin module
-
-
MJAVADOC-138
javadoc:test-javadoc failed if target/classes not already created
-
- relates to
-
MJAVADOC-179
Aggregate report ignores sourcepath customization of subprojects
-
-
MJAVADOC-194
javadoc 2.4 does not [build-helper:add-source {execution: add-source}] when aggregating a javadoc for a project
-
Here's a test project to play with. When invoking "mvn javadoc:javadoc" only the class "Main" makes it into the api docs. If you invoke "mvn compile" (where I added an execution of the javadoc plugin), you get both "Main" and "GeneratedClass".
If the @execute annotation really cannot be re-added due to
MJAVADOC-145, there must at least be some doc/faq about this odd behavior. However, I currently do not believe that @execute was the real cause of this other issue. I would rather ask why the mojo has @phase generate-sources as annotation. The Javadoc Plugin does not really participate in the default build cycle, its usually part of the site lifecycle.