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

Javadoc report not generated for multi-module project if run from parent level.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6
    • Labels:
      None
    • Environment:
      W2K, JDK 6u5, Maven 2.0.8

      Description

      For the following project design (s. attached testcase):

      parent
      - library // javadoc:aggregate!
      - module-a
      - module-b
      - application

      javadoc report for 'library' is not generated (not invoked), if 'mvn site' is
      called at 'parent' level (but is properly done if run at 'library' level itself).

      1. maven_release_failure_caused_by_mjavadoc.txt
        4 kB
        Stevo Slavic
      2. maven-site-javadoc-testcase.zip
        6 kB
        André Fügenschuh
      3. MJAVADOC-181.patch
        0.8 kB
        james.w.dumay
      4. MJAVADOC-181-1.patch
        1 kB
        Felix Knecht

        Issue Links

          Activity

          André Fügenschuh created issue -
          Dennis Lundberg made changes -
          Field Original Value New Value
          Component/s multi module [ 12948 ]
          Project Maven 2.x Site Plugin [ 11146 ] Maven 2.x Javadoc Plugin [ 11138 ]
          Affects Version/s 2.0-beta-6 [ 12151 ]
          Key MSITE-309 MJAVADOC-181
          Siveton Vincent made changes -
          Link This issue is related to MJAVADOC-179 [ MJAVADOC-179 ]
          Hide
          James William Dumay added a comment - - edited

          I can confirm that this is also a problem with my builds too.

          Show
          James William Dumay added a comment - - edited I can confirm that this is also a problem with my builds too.
          Hide
          James William Dumay added a comment -

          Patch fixes aggregate goal - it was checking the aggregate parameter when there was no need to.

          Show
          James William Dumay added a comment - Patch fixes aggregate goal - it was checking the aggregate parameter when there was no need to.
          james.w.dumay made changes -
          Attachment MJAVADOC-181.patch [ 37062 ]
          Hide
          Felix Knecht added a comment - - edited

          The problem is that the deprecated aggregate is still validated even if the latest (not deprecated) configuration using the aggregate goal is used. This results in an unwanted
          JavadocReport.canGenerateReport return=false, because aggregate (not set -> default=false) and isAggregator=true (see JavadocReport.java:

          /**

          {@inheritDoc}

          */
          public boolean canGenerateReport()
          {
          boolean canGenerate;
          if ( aggregate != isAggregator() )
          {
          canGenerate = false;
          ).
          This configuration will never generate an aggregated javadoc.
          Applied patch (MJAVADOC-181-1.patch) overwrites the canGenerateReport method. Deprecated aggregate shall not be used if the newer goal is used.

          Show
          Felix Knecht added a comment - - edited The problem is that the deprecated aggregate is still validated even if the latest (not deprecated) configuration using the aggregate goal is used. This results in an unwanted JavadocReport.canGenerateReport return=false, because aggregate (not set -> default=false) and isAggregator=true (see JavadocReport.java: /** {@inheritDoc} */ public boolean canGenerateReport() { boolean canGenerate; if ( aggregate != isAggregator() ) { canGenerate = false; ). This configuration will never generate an aggregated javadoc. Applied patch ( MJAVADOC-181 -1.patch) overwrites the canGenerateReport method. Deprecated aggregate shall not be used if the newer goal is used.
          Felix Knecht made changes -
          Attachment MJAVADOC-181-1.patch [ 37144 ]
          Hide
          Felix Knecht added a comment -

          IMO this is not a major issue but a blocker, because it avoids using the newer, non deprecated configuration of the javadoc plugin.

          Regards
          Felix

          Show
          Felix Knecht added a comment - IMO this is not a major issue but a blocker, because it avoids using the newer, non deprecated configuration of the javadoc plugin. Regards Felix
          Hide
          Julien HENRY added a comment -

          It is a blocker issue for me. I can't use the old way because my generated source files are not taken into account. The new way is working when running mvn javadoc:aggregate but not when running mvn site.

          Please apply the patch and release a new version!

          Show
          Julien HENRY added a comment - It is a blocker issue for me. I can't use the old way because my generated source files are not taken into account. The new way is working when running mvn javadoc:aggregate but not when running mvn site. Please apply the patch and release a new version!
          Siveton Vincent made changes -
          Link This issue is related to MJAVADOC-97 [ MJAVADOC-97 ]
          Hide
          Siveton Vincent added a comment -

          Should be fixed by MJAVADOC-97
          I added an IT in r796271, snap deployed

          Show
          Siveton Vincent added a comment - Should be fixed by MJAVADOC-97 I added an IT in r796271 , snap deployed
          Siveton Vincent made changes -
          Fix Version/s 2.6 [ 14525 ]
          Resolution Fixed [ 1 ]
          Assignee Vincent Siveton [ siveton ]
          Status Open [ 1 ] Closed [ 6 ]
          Hide
          Hervé Boutemy added a comment -

          I don't understand: the IT generates apidocs in module-a and module-b but not in library
          IIUC, the expected result was the contrary, no?
          can someone confirm that the actual result with maven-javadoc-plugin 2.6 and 2.7 is really what was expected?
          (FYI, I'm running into trouble with MJAVADOC-286, where the fix breaks the actual behaviour, and the more I think at it, the more I'm convinced this issue IT checks the contrary to the expected result...)

          Show
          Hervé Boutemy added a comment - I don't understand: the IT generates apidocs in module-a and module-b but not in library IIUC, the expected result was the contrary, no? can someone confirm that the actual result with maven-javadoc-plugin 2.6 and 2.7 is really what was expected? (FYI, I'm running into trouble with MJAVADOC-286 , where the fix breaks the actual behaviour, and the more I think at it, the more I'm convinced this issue IT checks the contrary to the expected result...)
          Hide
          Stevo Slavic added a comment -

          I think I just got hit by this issue - release:perform fails on multi-module project because of javadoc plugin. See maven_release_failure_caused_by_mjavadoc.txt for relevant build output.

          Show
          Stevo Slavic added a comment - I think I just got hit by this issue - release:perform fails on multi-module project because of javadoc plugin. See maven_release_failure_caused_by_mjavadoc.txt for relevant build output.
          Stevo Slavic made changes -
          Attachment maven_release_failure_caused_by_mjavadoc.txt [ 53027 ]
          Hide
          André Fügenschuh added a comment -

          @ Herve
          You are right. I don't know the IT, but the original intention was to aggregate javadocs at 'library' level (for 'module-[a|b]') and generate non-aggregate javadocs for 'application'.

          As for me, this issue hasn't been resolved, see: MSITE-518.

          Show
          André Fügenschuh added a comment - @ Herve You are right. I don't know the IT, but the original intention was to aggregate javadocs at 'library' level (for 'module-[a|b]') and generate non-aggregate javadocs for 'application'. As for me, this issue hasn't been resolved, see: MSITE-518 .
          Hervé Boutemy made changes -
          Link This issue relates to MJAVADOC-284 [ MJAVADOC-284 ]
          Lukas Theussl made changes -
          Link This issue is superceded by MSITE-518 [ MSITE-518 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 11:56:47 UTC 2015 [ 1428235007093 ]
          Mark Thomas made changes -
          Workflow jira [ 12722418 ] Default workflow, editable Closed status [ 12762458 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:11:46 UTC 2015 [ 1428279106587 ]
          Mark Thomas made changes -
          Workflow jira [ 12959926 ] Default workflow, editable Closed status [ 12996825 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          489d 17h 41m 1 Siveton Vincent 21/Jul/09 08:25

            People

            • Assignee:
              Siveton Vincent
              Reporter:
              André Fügenschuh
            • Votes:
              11 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development