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

Initial builds of a multi-module project fail

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Duplicate
    • Affects Version/s: 2.6.1
    • Fix Version/s: 2.7
    • Labels:
      None
    • Environment:
      Java jdk1.6.0_16, Maven 2.2.1, Windows Vista 64-bit
      Java jdk1.6.0_05, Maven 2.0.9, Windows XP 32-bit
    • Number of attachments :
      2

      Description

      I ran into a problem using Maven Javadoc Plugin 2.6.1 right after I released... I went from version 1.15 to 1.16-SNAPSHOT, and my 1.16-SNAPSHOT build failed (mvn clean install site) because Javadoc fails when run from the top-level parent. When it is building module A, the javadoc complains that module B and module C are missing – of course they are, they haven't been built yet. Note that running mvn clean install from module A works fine – the behavior is limited to running from the top-level parent – AND, if you run a mvn install for module B and module C, then you have given it what it needs and so you won't see the error.

      The attached example exhibits the problem. It was created from the j2ee-simple archetype – I only added the explicit javadoc plugin declaration to the top level pom to control the version being used. To recreate the problem, unzip and simply: mvn clean install site. You will get an error message like:

      [INFO] Unable to find resource 'root.project.projects:logging:jar:1.0' in repository central (http://repo1.maven.org/maven2)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.
      
      Missing:
      ----------
      1) root.project.projects:logging:jar:1.0
      
        Try downloading the file manually from the project website.
      
        Then, install it using the command:
            mvn install:install-file -DgroupId=root.project.projects -DartifactId=logging -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file
      
        Alternatively, if you host your own repository you can deploy the file there:
      
            mvn deploy:deploy-file -DgroupId=root.project.projects -DartifactId=logging -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=
      [id]
      
        Path to dependency:
              1) root.project:primary-source:jar:1.0
              2) root.project.projects:logging:jar:1.0
      
      ----------
      1 required artifact is missing.
      
      for artifact:
        root.project:primary-source:jar:1.0
      
      from the specified remote repositories:
        central (http://repo1.maven.org/maven2)
      

      As you can see, it seems to think that a submodule (in this case root.project.projects:logging:jar:1.0) is necessary to build the javadoc for the project... Since this is the first time that this is being built, the submodule does not exist (yet).

      I have replicated this problem on two different computing environments, so I'm convinced that the Maven version is not relevant.
      (It is unclear to me if this problem also existed with Javadoc 2.6, but I don't think so.)

        Issue Links

          Activity

          Hide
          Petra Flaitz added a comment -

          I have a multi-module-project. If I use version 2.7 of the javadoc-plugin and version 2.1.1 of the site-plugin, For the initial build, I need to call the goal javadoc:aggregate bevore calling the goal site. So I have "clean deploy javadoc:aggregate site site:deploy".

          For later builds and non multi-module-projects "clean deploy site site:deploy" is sufficient

          Show
          Petra Flaitz added a comment - I have a multi-module-project. If I use version 2.7 of the javadoc-plugin and version 2.1.1 of the site-plugin, For the initial build, I need to call the goal javadoc:aggregate bevore calling the goal site. So I have "clean deploy javadoc:aggregate site site:deploy". For later builds and non multi-module-projects "clean deploy site site:deploy" is sufficient
          Hide
          Dinesh Mehta added a comment -

          I have this issue even with version 2.7 of the plugin. If someone has been able to get this working with v2.7 can they post the settings/configuration needed to get the plugin work in aggregate mode for a multi-module project where the project has not yet been built/installed for the current version.

          Show
          Dinesh Mehta added a comment - I have this issue even with version 2.7 of the plugin. If someone has been able to get this working with v2.7 can they post the settings/configuration needed to get the plugin work in aggregate mode for a multi-module project where the project has not yet been built/installed for the current version.
          Hide
          Yegor Bugayenko added a comment -

          The problem is still there is not fixed. Why the issue is closed?

          Show
          Yegor Bugayenko added a comment - The problem is still there is not fixed. Why the issue is closed?
          Hide
          brundibar added a comment -

          It really seams to be incorrectly marked as "duplicate" !

          Related IMHO also to: http://jira.codehaus.org/browse/MENFORCER-42

          PLEASE REOPEN THIS ISSUE!!!!

          Thanks,
          Regards

          Show
          brundibar added a comment - It really seams to be incorrectly marked as "duplicate" ! Related IMHO also to: http://jira.codehaus.org/browse/MENFORCER-42 PLEASE REOPEN THIS ISSUE!!!! Thanks, Regards
          Hide
          Mikis Seth Sørensen added a comment -

          Please, please reopen this issue.

          It is a constant source of frustration in our multi-module-projects trying to use Maven for releasing.

          The problem remains in 2.8 by the way.

          Show
          Mikis Seth Sørensen added a comment - Please, please reopen this issue. It is a constant source of frustration in our multi-module-projects trying to use Maven for releasing. The problem remains in 2.8 by the way.

            People

            • Assignee:
              John Casey
              Reporter:
              Anthony Whitford
            • Votes:
              18 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: