Stephen Connolly wrote:

I would have expected that there would be two javadoc mojo's.... something
like javadoc:javadoc which just generates the javadoc for the current
module, and javadoc:unified-javadoc which would be an @aggregator mojo that
produces the unified javadoc of all child modules.

Obviously, the javadoc mojo developers did not do this!

What Javadoc/JXR did instead was not rely on @aggregator at all. JXR doesn't declare it of course, but Javadoc declares it but doesn't use it.

Instead, Javadoc has an "aggregate" parameter; the first line of its executeReport method is: "if ( aggregate && !project.isExecutionRoot() ) return;". It's like simulating the effect of @aggregator without actually using @aggregator. In Surefire Report I copied that line too, thinking it was necessary; as a result, dropping @aggregator from Surefire Report works for me.

JXR has a similar parameter.

SUREFIRE-348 suggests another way to handle this that I didn't follow at the time, but which makes a lot of sense to me. There, John Allen claims that:

* reporting mojos can't be @aggregators (this seems to be what my experiments + SUREFIRE-449 show)

* the JXR/Javadoc "aggregate" parameter is a bad idea, because it provides no way of aggregating reports at intermediate levels of the hierarchy. (Note that when aggregate=true, the jxr/javadoc/surefire-report won't do anything unless the project is the execution root.)

If you've got one grandparent with 5 parents with 25 grandchildren, you may want a Javadoc rollup of just one branch of the hierarchy, or at every level of the hierarchy.

* So he advocates making an "aggregate" mojo that pulls up the *data* from the lower-levels, e.g. copying XML files from */target/surefire-reports into one big directory, so you can then run surefire-report at any level of the hierarchy.

surefire-report:aggregate makes sense, perhaps, but what about jxr:aggregate? javadoc:aggregate? Not so sure in that case, since that may involve moving around every source file.

-Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to