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

Problem with CI friendly usage of ${..} reactor order is changed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2.1, 3.3.1, 3.3.9
    • Fix Version/s: 3.5.0-beta-1, 3.5.0
    • Component/s: None
    • Labels:
      None

      Description

      If I use the feature to define the revision in a property like revision, changelist or sha1 the order of the reactor during the build is changed. The parent is not executed first it is executed last.

      https://github.com/khmarbaise/javaee (The mvn321 branch of it):
      So tested with Maven 3.2.5, 3.3.1, 3.3.9
      First run via mvn clean package
      and than:

      ~/ws-git/javaee (mvn321 *)$ mvn --version
      Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T21:10:27+01:00)
      Maven home: /usr/share/maven
      Java version: 1.7.0_79, vendor: Oracle Corporation
      Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: "mac os x", version: "10.8.5", arch: "x86_64", family: "mac"
      
      $ mvn clean package -Drevision=2.9.87-SNAPSHOT | tee mvn.log
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Build Order:
      [INFO]
      [INFO] domain
      [INFO] service-client
      [INFO] webgui
      [INFO] service
      [INFO] app
      [INFO] appasm
      [INFO] shade
      [INFO] assembly
      [INFO] parent
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building domain 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ domain ---
      [INFO] Deleting /Users/kama/ws-git/javaee/domain/target
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ domain ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/domain/src/main/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ domain ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1 source file to /Users/kama/ws-git/javaee/domain/target/classes
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ domain ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/domain/src/test/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ domain ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ domain ---
      [INFO] No tests to run.
      [INFO]
      [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ domain ---
      [INFO] Building jar: /Users/kama/ws-git/javaee/domain/target/domain-2.9.87-SNAPSHOT.jar
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ domain ---
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building service-client 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ service-client ---
      [INFO] Deleting /Users/kama/ws-git/javaee/service-client/target
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ service-client ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/service-client/src/main/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ service-client ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1 source file to /Users/kama/ws-git/javaee/service-client/target/classes
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ service-client ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/service-client/src/test/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ service-client ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ service-client ---
      [INFO] No tests to run.
      [INFO]
      [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ service-client ---
      [INFO] Building jar: /Users/kama/ws-git/javaee/service-client/target/service-client-2.9.87-SNAPSHOT.jar
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ service-client ---
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building webgui 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ webgui ---
      [INFO] Deleting /Users/kama/ws-git/javaee/webgui/target
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ webgui ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 0 resource
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ webgui ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1 source file to /Users/kama/ws-git/javaee/webgui/target/classes
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ webgui ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/webgui/src/test/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ webgui ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ webgui ---
      [INFO] No tests to run.
      [INFO]
      [INFO] --- maven-war-plugin:2.6:war (default-war) @ webgui ---
      [INFO] Packaging webapp
      [INFO] Assembling webapp [webgui] in [/Users/kama/ws-git/javaee/webgui/target/webgui-2.9.87-SNAPSHOT]
      [INFO] Processing war project
      [INFO] Copying webapp resources [/Users/kama/ws-git/javaee/webgui/src/main/webapp]
      [INFO] Webapp assembled in [37 msecs]
      [INFO] Building war: /Users/kama/ws-git/javaee/webgui/target/webgui-2.9.87-SNAPSHOT.war
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ webgui ---
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building service 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ service ---
      [INFO] Deleting /Users/kama/ws-git/javaee/service/target
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ service ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/service/src/main/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ service ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 1 source file to /Users/kama/ws-git/javaee/service/target/classes
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ service ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/service/src/test/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ service ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ service ---
      [INFO] No tests to run.
      [INFO]
      [INFO] --- maven-ejb-plugin:2.5.1:ejb (default-ejb) @ service ---
      [INFO] Building EJB service-2.9.87-SNAPSHOT with EJB version 3.1
      [INFO] Building jar: /Users/kama/ws-git/javaee/service/target/service-2.9.87-SNAPSHOT.jar
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ service ---
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building app 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ app ---
      [INFO] Deleting /Users/kama/ws-git/javaee/app/target
      [INFO]
      [INFO] --- maven-ear-plugin:2.10.1:generate-application-xml (default-generate-application-xml) @ app ---
      [INFO] Generating application.xml
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ app ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/app/src/main/resources
      [INFO]
      [INFO] --- maven-ear-plugin:2.10.1:ear (default-ear) @ app ---
      [INFO] Copying artifact [war:com.soebes.examples.j2ee:webgui:2.9.87-SNAPSHOT] to [webgui-2.9.87-SNAPSHOT.war]
      [INFO] Copying artifact [ejb:com.soebes.examples.j2ee:service:2.9.87-SNAPSHOT] to [service-2.9.87-SNAPSHOT.jar]
      [INFO] Copying artifact [jar:com.soebes.examples.j2ee:service-client:2.9.87-SNAPSHOT] to [service-client-2.9.87-SNAPSHOT.jar]
      [INFO] Copying artifact [jar:com.soebes.examples.j2ee:domain:2.9.87-SNAPSHOT] to [domain-2.9.87-SNAPSHOT.jar]
      [INFO] Copying artifact [jar:log4j:log4j:1.2.16] to [log4j-1.2.16.jar]
      [INFO] Could not find manifest file: /Users/kama/ws-git/javaee/app/target/app-2.9.87-SNAPSHOT/META-INF/MANIFEST.MF - Generating one
      [INFO] Building jar: /Users/kama/ws-git/javaee/app/target/app-2.9.87-SNAPSHOT.ear
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ app ---
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building appasm 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ appasm ---
      [INFO] Deleting /Users/kama/ws-git/javaee/appasm/target
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ appasm ---
      [INFO]
      [INFO] --- appassembler-maven-plugin:1.10:assemble (package) @ appasm ---
      [INFO] Installing artifact /Users/kama/ws-git/javaee/webgui/target/webgui-2.9.87-SNAPSHOT.war to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/webgui-2.9.87-SNAPSHOT.war
      [INFO] Installing artifact /Users/kama/ws-git/javaee/service/target/service-2.9.87-SNAPSHOT.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/service-2.9.87-SNAPSHOT.jar
      [INFO] Installing artifact /Users/kama/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/log4j-1.2.16.jar
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building shade 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ shade ---
      [INFO] Deleting /Users/kama/ws-git/javaee/shade/target
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ shade ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/shade/src/main/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ shade ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ shade ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /Users/kama/ws-git/javaee/shade/src/test/resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ shade ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ shade ---
      [INFO] No tests to run.
      [INFO]
      [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ shade ---
      [WARNING] JAR will be empty - no content was marked for inclusion!
      [INFO] Building jar: /Users/kama/ws-git/javaee/shade/target/shade-2.9.87-SNAPSHOT.jar
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ shade ---
      [INFO]
      [INFO] --- maven-shade-plugin:2.4.2:shade (test) @ shade ---
      [INFO] Including com.soebes.examples.j2ee:webgui:war:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:service:ejb:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:service-client:jar:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:domain:jar:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including log4j:log4j:jar:1.2.16 in the shaded jar.
      [INFO] Attaching shaded artifact.
      [INFO]
      [INFO] --- maven-shade-plugin:2.4.2:shade (dev) @ shade ---
      [INFO] Including com.soebes.examples.j2ee:webgui:war:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:service:ejb:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:service-client:jar:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:domain:jar:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including log4j:log4j:jar:1.2.16 in the shaded jar.
      [INFO] Attaching shaded artifact.
      [INFO]
      [INFO] --- maven-shade-plugin:2.4.2:shade (prod) @ shade ---
      [INFO] Including com.soebes.examples.j2ee:webgui:war:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:service:ejb:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:service-client:jar:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including com.soebes.examples.j2ee:domain:jar:2.9.87-SNAPSHOT in the shaded jar.
      [INFO] Including log4j:log4j:jar:1.2.16 in the shaded jar.
      [INFO] Attaching shaded artifact.
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building assembly 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ assembly ---
      [INFO] Deleting /Users/kama/ws-git/javaee/assembly/target
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ assembly ---
      [INFO]
      [INFO] --- maven-assembly-plugin:2.6:single (assemblies) @ assembly ---
      [INFO] Reading assembly descriptor: assembly.xml
      [INFO] Reading assembly descriptor: jar-with-prod.xml
      [INFO] Reading assembly descriptor: jar-with-dev.xml
      [INFO] Building zip: /Users/kama/ws-git/javaee/assembly/target/assembly-2.9.87-SNAPSHOT-archive.zip
      [INFO] Building jar: /Users/kama/ws-git/javaee/assembly/target/assembly-2.9.87-SNAPSHOT-prod.jar
      [INFO] Building jar: /Users/kama/ws-git/javaee/assembly/target/assembly-2.9.87-SNAPSHOT-dev.jar
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building parent 2.9.87-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ parent ---
      [INFO]
      [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ parent ---
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] domain ............................................. SUCCESS [  1.741 s]
      [INFO] service-client ..................................... SUCCESS [  0.069 s]
      [INFO] webgui ............................................. SUCCESS [  0.469 s]
      [INFO] service ............................................ SUCCESS [  0.349 s]
      [INFO] app ................................................ SUCCESS [  0.236 s]
      [INFO] appasm ............................................. SUCCESS [  0.192 s]
      [INFO] shade .............................................. SUCCESS [  0.419 s]
      [INFO] assembly ........................................... SUCCESS [  1.018 s]
      [INFO] parent ............................................. SUCCESS [  0.003 s]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4.962 s
      [INFO] Finished at: 2016-07-03T14:31:18+02:00
      [INFO] Final Memory: 43M/708M
      [INFO] ------------------------------------------------------------------------

      Which is very interesting to observe that the order in the reactor has been changed which means the parent is the last element instead of being the first...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                khmarbaise Karl Heinz Marbaise
                Reporter:
                khmarbaise Karl Heinz Marbaise
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: