[ https://issues.apache.org/jira/browse/MJAVADOC-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raymond DeCampo updated MJAVADOC-400: ------------------------------------- Attachment: MJAVADOC-400-maven-javadoc-plugin.patch Patch for MJAVADOC-400. The behavior of the plugin before the patch was to do nothing if the project was not the execution root. When the project was the execution root, all the reactor projects are aggregated into the resulting javadoc. The patch changes the behavior so that the plugin ignores the execution root flag. Instead of including all reactor projects, the plugin will determine which reactor projects are modules of the project recursively. The modules (and their modules, etc) are included in the resulting javadoc. So in the case when the project is the execution root, the result will be the same as before the patch since the set of reactor projects is the same as the set of submodules (determined recursively) of the execution root project. There was no direct method I could find to discover which projects within the reactor projects were modules of a given project. From the project all I had access to was the relative path to the basedir of the module project. So I used this directory to compare to the basedirs of the reactor projects to find the module projects. I look forward to this being improved when the Maven API improves or someone discovers a less indirect way to get this information. The aggregation tests are modified to include a new project, project3 which contains project 2 as a module. Project1 and project3 are made to be modules of the main aggregate test project. Tests are run on the main aggregate test module on project3 and the results are verified. I needed to add additional supporting details to the project stubs to support the new code. > aggregate-jar does nothing if called as part of a reactor build > --------------------------------------------------------------- > > Key: MJAVADOC-400 > URL: https://issues.apache.org/jira/browse/MJAVADOC-400 > Project: Maven Javadoc Plugin > Issue Type: Bug > Affects Versions: 2.9.1 > Environment: Reproduced with Oracle Java 1.7.0_45, Maven 3.0.5. Also > reproduced with Maven 3.2.2. > Reporter: Philip Aston > Attachments: MJAVADOC-400-maven-javadoc-plugin.patch > > > The attached {{reproduction.tgz}} contains a multi-module project > _com.repo:parent_, and two child modules, _com.repo:module_a_ and > _com.repo:module_b_. _com.repo:module-a_ is a jar module that contains a Java > class. _com.repo:module-b_ depends on _com.repo:module-a_ and has uses > {{javadoc:aggregate-jar}} to create a javadoc attachment. > If I change into the {{module_b}} directory and run {{mvn clean install}}, a > {{com.repo:module-b:javadoc}} attachment is not created. > However, if I run {{mvn clean install}} from the top level, a > {{com.repo:module-b:javadoc}} attachment is *not* created. I believe this to > be a bug. > Running with -X shows that the aggregate-jar mojo is configured, but never > executed. > If I change to {{module-b}} and run with -X, I see an > MultipleArtifactsNotFoundException, but it otherwise behaves as I would > expect. This looks similar to the symptoms of MVN-4618. -- This message was sent by Atlassian JIRA (v6.3.4#6332)