Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3706

Multi-module project with intermodule dependencies fails to package

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.0.9
    • None
    • Reactor and Workspace
    • None

    Description

      Say we have a maven project with following module structure:

      mainproject (packaging: pom)
      module 1 (packaging: jar)
      module 2 (packaging: pom)
      module 2.1 (packing: jar, depends on module 1)
      module 2.2 (packagin: jar, depends on module 2.1)
      module 3 (packaging: pom)
      module 3.1 (packaing: jar, depends on module 1)
      module 3.2 (packaging: jar, depends on module 2.2)

      If using command line one issues "mvn clean package" on a main project a build error gets reported that while building module 3.1 maven "failed to resolve artifact", reporting module 1 as missing. If using command line one issues "mvn clean install", again on a main project, a similar build error gets reported but now while building module 3.2 maven failed to resolve artifact, reporting as missing module 3.1 and module 2.2.
      Before issuing either of the commands I've cleaned up local repository from all of these modules artifacts, expecting that maven will resolve dependencies between modules while building them without using local or remote repositories.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sslavic Stevo Slavić
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: