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

Multi-module project is non-deterministic in evaluating reactor artifacts defined as dependencies unless they are installed in the local repository

    XMLWordPrintableJSON

Details

    Description

      Summary: Multi-module project is non-deterministic in evaluating reactor artifacts defined as dependencies unless they are installed in the local repository

      I cannot build either a leaf project (sub1-module1) or the master project (master) until I 'mvn install' the sub-modules (sub<N>-module<M>).

      I believe that dependency modules found only in the reactor should be added to:

      [DEBUG] (f) classpathElements = [/Users/evanchsa/src/maven-test/subproject1/sub1-module1/target/classes]

      Detailed setup:

      I have a multi-module project that is laid out in the following POM inheritance (this is not the filesystem layout):

      master
      + sub1-master

      • sub1-module1
      • sub1-module2
        + sub2-master
      • sub2-module1
      • sub2-module2

      Sub-modules are type "jar" and 1 "war" and there are dependencies within the sub-modules as follows (using mvn dependency:tree):

      1. sub1-module1

      • Depends on no other modules

      2. sub1-module2

      • test-group:sub1-module2:jar:0.0.1
        - test-group:sub1-module1:jar:0.0.1:compile

      3. sub2-module1

      • test-group:sub2-module1:jar:0.0.1
        - test-group:sub1-module2:jar:0.0.1:compile
        - test-group:sub1-module1:jar:0.0.1:compile

      4. sub2-module2 (this is the WAR)

      • test-group:sub2-module2:jar:0.0.1
        - test-group:sub2-module1:jar:0.0.1:compile
        - test-group:sub1-module2:jar:0.0.1:compile
        - test-group:sub1-module1:jar:0.0.1:compile

      Project filesystem layout:

      build/master/pom.xml
      subproject1/sub1-master/pom.xml
      subproject1/sub1-module1/pom.xml
      subproject1/sub1-module2/pom.xml
      subproject2/sub2-master/pom.xml
      subproject2/sub2-module1/pom.xml
      subproject2/sub2-module2/pom.xml

      Attachments

        1. maven-test.tar.gz
          2 kB
          Stephen Evanchik
        2. master-compile-run.txt
          23 kB
          Stephen Evanchik
        3. full-dependency-tree.txt
          4 kB
          Stephen Evanchik

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              evanchsa Stephen Evanchik
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: