|
Vincent Siveton made changes - 12/Aug/08 06:03 AM
Vincent Siveton made changes - 12/Aug/08 06:03 AM
In fact, I noticed some warn like the following: [INFO] Skipped "JavaDocs" report, file "apidocs/index.html" already exists for the English version. So, AggregatorJavadocReport and JavadocReport are both used. It is normal IMHO since the PluginManager invokes all MavenReport. A solution could be to move the aggregate parameter into AggregatorJavadocReport/AggregatorTestJavadocReport or to create a new parameter, like aggregator, only for these mojos. Proposed patch.
Vincent Siveton made changes - 12/Aug/08 12:57 PM
Another idea: Currently, the parameter "aggregate" controls the aggregation behavior of say "javadoc:javadoc". However, this is not reliable, proper aggregation also requires to collectively fork all projects in the reactor. This can only be achieved via the "@aggregator" mojo annotation. So I believe the natural solution is to query the existence of this annotation whereever the code now checks the "aggregate" parameter. Hence, I added a new method isAggregator() that mojos override to report their aggregating behavior. The existing parameter "aggregate" is kept only for convenience during the site lifecycle. The implementation of canGenerateReport() will skip those reports whose aggregator flag doesn't match the value specified by the user via "aggregate". This should allow to run either JavadocReport or AggregateJavadocReport without the need for <reportSets>. The parameter is ignored when the mojos are invoked via cli or build lifecycle, i.e. "mvn javadoc:javadoc -Daggregate=true" will no longer produce aggregated output. Instead, users should call "mvn javadoc:aggregate". That's a break, but I believe that's the only correct way in terms of proper aggregation. I haven't tested this yet, it's merely a sketch for discussion.
Benjamin Bentmann made changes - 12/Aug/08 01:41 PM
Considering the penalty of the forked lifecycles during the site generation of every module caused by "@aggregator" on the new mojos, I would however assume that people will sooner than later user <reportSets> to disable them from running in child modules.
Vincent Siveton made changes - 13/Aug/08 05:02 PM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To reproduce it, go to plugin-tools or plugin-testing and run:
You will see an empty maven-plugin-tools-api\apidocs\index.html or maven-plugin-tools-api\testapidocs\index.html