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

Regression: 2.4-SNAPSHOT does not generate docs for generates sources if run outside a build

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Labels:
      None
    • Environment:
      Maven 2.0.8, JDK 1.5.0_12, WinXP

      Description

      The fix applied for MJAVADOC-145 causes the plugin to loose source roots that get created during the generate-sources build phase. I.e. if one runs

      mvn org.apache.maven.plugins:maven-javadoc-plugin:2.3:javadoc
      

      the plugin properly documents generated source code but running

      mvn org.apache.maven.plugins:maven-javadoc-plugin:2.4-SNAPSHOT:javadoc
      

      only documents the default source root "src/main/java".

      Usually, I would expect to have the JavadocReport mojo @execute phase="generate-sources" and the TestJavadocReport mojo to have @execute phase="generate-test-sources" (although it's kind of ugly to have the compile phase being run in the later case).

      In lack of these annotations, the plugin produces different output when run directly from the command line or indirectly as part of build.

      1. MJAVADOC-168.zip
        1 kB
        Benjamin Bentmann

        Issue Links

          Activity

          Benjamin Bentmann created issue -
          Benjamin Bentmann made changes -
          Field Original Value New Value
          Link This issue is related to MJAVADOC-145 [ MJAVADOC-145 ]
          Benjamin Bentmann made changes -
          Link This issue is related to MJAVADOC-138 [ MJAVADOC-138 ]
          Hide
          Benjamin Bentmann added a comment -

          Here's a test project to play with. When invoking "mvn javadoc:javadoc" only the class "Main" makes it into the api docs. If you invoke "mvn compile" (where I added an execution of the javadoc plugin), you get both "Main" and "GeneratedClass".

          If the @execute annotation really cannot be re-added due to MJAVADOC-145, there must at least be some doc/faq about this odd behavior. However, I currently do not believe that @execute was the real cause of this other issue. I would rather ask why the mojo has @phase generate-sources as annotation. The Javadoc Plugin does not really participate in the default build cycle, its usually part of the site lifecycle.

          Show
          Benjamin Bentmann added a comment - Here's a test project to play with. When invoking "mvn javadoc:javadoc" only the class "Main" makes it into the api docs. If you invoke "mvn compile" (where I added an execution of the javadoc plugin), you get both "Main" and "GeneratedClass". If the @execute annotation really cannot be re-added due to MJAVADOC-145 , there must at least be some doc/faq about this odd behavior. However, I currently do not believe that @execute was the real cause of this other issue. I would rather ask why the mojo has @phase generate-sources as annotation. The Javadoc Plugin does not really participate in the default build cycle, its usually part of the site lifecycle.
          Benjamin Bentmann made changes -
          Attachment MJAVADOC-168.zip [ 31951 ]
          Hide
          Benjamin Bentmann added a comment -

          The TestJavadocReport mojo has @phase generate-test-sources which doesn't make much sense either. I bet the original committer meant @execute phase=generate-test-sources instead.

          Show
          Benjamin Bentmann added a comment - The TestJavadocReport mojo has @phase generate-test-sources which doesn't make much sense either. I bet the original committer meant @execute phase=generate-test-sources instead.
          Hide
          Siveton Vincent added a comment -

          fixed in r661899, snapshot deployed

          Show
          Siveton Vincent added a comment - fixed in r661899, snapshot deployed
          Siveton Vincent made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Assignee Vincent Siveton [ siveton ]
          Fix Version/s 2.5 [ 14120 ]
          Siveton Vincent made changes -
          Link This issue is duplicated by MJAVADOC-186 [ MJAVADOC-186 ]
          Siveton Vincent made changes -
          Link This issue relates to MJAVADOC-179 [ MJAVADOC-179 ]
          Benjamin Bentmann made changes -
          Link This issue is duplicated by MJAVADOC-194 [ MJAVADOC-194 ]
          Siveton Vincent made changes -
          Link This issue is duplicated by MJAVADOC-194 [ MJAVADOC-194 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MJAVADOC-194 [ MJAVADOC-194 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 11:56:47 UTC 2015 [ 1428235007093 ]
          Mark Thomas made changes -
          Workflow jira [ 12722405 ] Default workflow, editable Closed status [ 12762611 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:11:46 UTC 2015 [ 1428279106587 ]
          Mark Thomas made changes -
          Workflow jira [ 12959928 ] Default workflow, editable Closed status [ 12996838 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          133d 8h 15m 1 Siveton Vincent 30/May/08 17:20

            People

            • Assignee:
              Siveton Vincent
              Reporter:
              Benjamin Bentmann
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development