Maven Javadoc Plugin
  1. Maven Javadoc Plugin
  2. MJAVADOC-137

javadoc:javadoc always runs as "aggregator"

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In version 2.2, javadoc aggregation was configurable using the configuration property "aggregate". In version 2.3, all javadoc goals got the @aggregator attribute added to its mojos (through a change in org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java), and the goals now always run aggregated regardless of the configuration setting. This breaks our build as we require non-aggregated javadoc execution in our multi-module poms. Please fix this so this is once again configurable and backwards compatible with previous versions of the javadoc plug-in.

        Issue Links

          Activity

          Hide
          Benjamin Bentmann added a comment -

          I must confess I still could not figure out how exactly @aggregator affects the plugin's execution, the Mojo API is quite short about this. If there are use-cases that require this annotation, then it might be worth to consider splitting mojos into two: one that has @aggregator and one that has not. This way, the user can choose the appropriate mojo. The Assembly Plugin uses this approach, too.

          Show
          Benjamin Bentmann added a comment - I must confess I still could not figure out how exactly @aggregator affects the plugin's execution, the Mojo API is quite short about this. If there are use-cases that require this annotation, then it might be worth to consider splitting mojos into two: one that has @aggregator and one that has not. This way, the user can choose the appropriate mojo. The Assembly Plugin uses this approach, too.
          Hide
          Dan Fabulich added a comment -

          I'm pretty sure MNG-2184 is to blame here; it seems clear that reporting plugins that use forked lifecycles should not use @aggregator. At least in this case, it seems to be harmful and unnecessary.

          FYI, I can't get maven-javadoc-plugin to "mvn install" from trunk (I get test failures), but the 2.3 tag builds just fine; when I remove the @aggregator tag from the mojo, it seems to work perfectly.

          http://www.nabble.com/%40aggregator-mojo-annotation-td15302246s177.html

          Show
          Dan Fabulich added a comment - I'm pretty sure MNG-2184 is to blame here; it seems clear that reporting plugins that use forked lifecycles should not use @aggregator. At least in this case, it seems to be harmful and unnecessary. FYI, I can't get maven-javadoc-plugin to "mvn install" from trunk (I get test failures), but the 2.3 tag builds just fine; when I remove the @aggregator tag from the mojo, it seems to work perfectly. http://www.nabble.com/%40aggregator-mojo-annotation-td15302246s177.html
          Hide
          Wendy Smoak added a comment -

          I added an integration test for this in r632888. Unfortunately, I can't figure out how to get it to fail when javadoc plugin's 'jar' goal is run from the pom.

          http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/

          If you check that out and execute 'mvn javadoc:jar' you do not get the javadoc jars. It says:

          INFO] [javadoc:jar]
          [INFO] Not executing Javadoc as the project is not a Java classpath-capable package

          Change pluginManagement to version 2.2 and it will work.

          Any idea how to demonstrate that from a pom? I really don't want to touch the code without a failing automated test.

          Show
          Wendy Smoak added a comment - I added an integration test for this in r632888. Unfortunately, I can't figure out how to get it to fail when javadoc plugin's 'jar' goal is run from the pom. http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-137/ If you check that out and execute 'mvn javadoc:jar' you do not get the javadoc jars. It says: INFO] [javadoc:jar] [INFO] Not executing Javadoc as the project is not a Java classpath-capable package Change pluginManagement to version 2.2 and it will work. Any idea how to demonstrate that from a pom? I really don't want to touch the code without a failing automated test.
          Hide
          Wendy Smoak added a comment -

          Okay, now in r632911 we have a properly failing test using the invoker plugin. Next step is to revert the changes from MJAVADOC-104.

          Show
          Wendy Smoak added a comment - Okay, now in r632911 we have a properly failing test using the invoker plugin. Next step is to revert the changes from MJAVADOC-104 .
          Hide
          Wendy Smoak added a comment -

          The changes from MJAVADOC-104 (less some noise) have been reverted [1] and a new snapshot deployed. I'll close this in a few days if there are no further comments.

          [1] http://svn.apache.org/viewvc?rev=632945&view=rev

          Show
          Wendy Smoak added a comment - The changes from MJAVADOC-104 (less some noise) have been reverted [1] and a new snapshot deployed. I'll close this in a few days if there are no further comments. [1] http://svn.apache.org/viewvc?rev=632945&view=rev

            People

            • Assignee:
              Unassigned
              Reporter:
              Peter Hendriks
            • Votes:
              14 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: