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 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
    • Testcase included:
      yes
    • Number of attachments :
      4

      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).

        Issue Links

          Activity

          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.
          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.
          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!
          Hide
          Vincent Siveton added a comment -

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

          Show
          Vincent Siveton added a comment - Should be fixed by MJAVADOC-97 I added an IT in r796271 , snap deployed
          Hide
          Herve 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
          Herve 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.
          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 .

            People

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

              Dates

              • Created:
                Updated:
                Resolved: