I was looking at issue MJAVADOC-400 (
https://issues.apache.org/jira/browse/MJAVADOC-400).  I have been working
potential fix, I just want to check in before I put all the polish on it
and submit it.

The current behavior of the plugin is if one of the aggregate goals is
targeted, javadoc is only generated if the project is the execution root.
In that case, the javadoc for all the reactor projects are aggregated into
the result. If the project in question is not the execution root (i.e. it
is a module or grand-module (etc.) of the root project) then the javadoc is
not generated and no error is reported.

I have not been able to determine the reasoning behind the above behavior,
except that if non-execution root projects were allowed to execute then as
written the plugin would pull in all the javadoc from all the reactor
projects, resulting in different results depending on what reactor projects
were pulled in by different roots.  But in my mind that is just a bug in
the implementation, not a reason to prevent execution on module projects.

So, with the goal of preserving the current behavior when javadoc was
executed by the current code, and the goal of generating the same javadoc
on a project whether it is the execution root, a module or a
sub-sub-module, etc., I propose that instead of pulling in all reactor
projects to generate javadoc, the plugin pulls in projects that are modules
of the project and then recursively include the modules of those projects.
I'll be working on implementing that fix and preparing a patch to submit.

Thanks,
Ray

Reply via email to