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

aggregate report requires to have aggregate=true configuration parameter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Labels:
      None
    • Environment:
      Maven 2.0.9
      Windows XP SP2

      Description

      Project setup: I have a multi-module project (standard nested layout). The reports are configured in the parent project. I use the "aggregate" report to create an aggregated javadoc by the maven-javadoc-plugin:
      <reportSets>
      <reportSet>
      <reports>
      <report>aggregate</report>
      <reports>
      </reportSet>
      </reportSets>

      Problem: The aggregate report is ignored, when I launch the "mvn site" command, unless the aggregated parameter is set to true in the maven-javadoc-plugin configuration. So the following setup is required in pom.xml:
      <reportSets>
      <reportSet>
      <configuration>
      <encoding>UTF-8</encoding>
      <aggregate>true</aggregate>
      </configuration>
      <reports>
      <report>aggregate</report>
      <reports>
      </reportSet>
      </reportSets>

      Desired functionality: Launch the aggregate goal, if it is declared in the report section. Do not require the aggregate parameter=true setting (it is a duplication and also the aggregate parameter is deprecated). The following setup should be enough in pom.xml:
      <reportSets>
      <reportSet>
      <configuration>
      <encoding>UTF-8</encoding>
      </configuration>
      <reports>
      <report>aggregate</report>
      <reports>
      </reportSet>
      </reportSets>

      Comment:
      The aggregate goal works fine (it does not require to have the aggregate=true parameter), if it is launched directly. That is by the "mvn javadoc:aggregate" command.
      It just does not work, when it is launched indirectly through the site plugin as a report.

        Issue Links

          Activity

          Gabriel Forro created issue -
          Hide
          Jeff Maxwell added a comment -

          I have created a patch
          In org.apache.maven.plugin.javadoc.JavadocReport.canGenerateReport() isAggregator() is tested against the aggregate instance variable.

          This is incorrect.

          I believe the correct logic is as follows:

          isAggregator hasSourceFiles isRootProject Generate Report
          True True True True
          True True False False
          True False True False
          True False False False
          False True True True
          False True False True
          False False True False
          False False False False
          Show
          Jeff Maxwell added a comment - I have created a patch In org.apache.maven.plugin.javadoc.JavadocReport.canGenerateReport() isAggregator() is tested against the aggregate instance variable. This is incorrect. I believe the correct logic is as follows: isAggregator hasSourceFiles isRootProject Generate Report True True True True True True False False True False True False True False False False False True True True False True False True False False True False False False False False
          Jeff Maxwell made changes -
          Field Original Value New Value
          Attachment MJAVADOC-230-maven-javadoc-plugin.patch [ 42444 ]
          Hide
          Siveton Vincent added a comment -

          Patch applied in r794114

          Show
          Siveton Vincent added a comment - Patch applied in r794114
          Siveton Vincent made changes -
          Assignee Vincent Siveton [ siveton ]
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Fix Version/s 2.6 [ 14525 ]
          Siveton Vincent made changes -
          Link This issue is duplicated by MJAVADOC-219 [ MJAVADOC-219 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 11:56:47 UTC 2015 [ 1428235007093 ]
          Mark Thomas made changes -
          Workflow jira [ 12722467 ] Default workflow, editable Closed status [ 12762419 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:11:46 UTC 2015 [ 1428279106587 ]
          Mark Thomas made changes -
          Workflow jira [ 12959976 ] Default workflow, editable Closed status [ 12996905 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          70d 13h 26m 1 Siveton Vincent 14/Jul/09 19:25

            People

            • Assignee:
              Siveton Vincent
              Reporter:
              Gabriel Forro
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development