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

Problem with CI friendly usage of ${..} which is already defined via property in pom file.

    Details

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

      Description

      I have test project where i defined the pom like this:

        <modelVersion>4.0.0</modelVersion>
      
        <groupId>com.soebes.examples.j2ee</groupId>
        <artifactId>parent</artifactId>
        <version>${revision}</version>
        <packaging>pom</packaging>
      

      If i define the revision on command line like this.

      mvn -Drevision=1.0-SNAPSHOT clean package

      everything fine...

      But now i want to make the usage a bit more convenient so i added the following to my pom:

        <properties>
          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
          <revision>1.0-SNAPSHOT</revision>
        </properties>
      

      to have a default for revision which works fine now...
      But if i would like to overwrite the property from command line like this:

      mvn -Drevision=1.0 clean package

      the build failes in the following location:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single (assemblies) on project assembly: 
      Failed to create assembly: Unable to resolve dependencies for assembly 'archive': Failed to resolve dependencies for assembly: 
      Unable to get dependency information for com.soebes.examples.j2ee:service-client:jar:1.0-SNAPSHOT: 
      Failed to process POM for com.soebes.examples.j2ee:service-client:jar:1.0-SNAPSHOT: 
      Non-resolvable parent POM for com.soebes.examples.j2ee:service-client:[unknown-version]: 
      Failure to find com.soebes.examples.j2ee:parent:pom:${revision} in http://localhost:8081/nexus/content/groups/public was 
      cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or 
      updates are forced
      [ERROR] com.soebes.examples.j2ee:service-client:jar:1.0-SNAPSHOT
      
      1. x.diff
        4 kB
        Karl Heinz Marbaise

        Issue Links

          Activity

          Hide
          khmarbaise Karl Heinz Marbaise added a comment - - edited

          I'm using the following example project:
          https://github.com/khmarbaise/javaee (The mvn321 branch of it):
          So retest with Maven 3.2.5:
          First run via mvn clean package
          and than:

          ~/ws-git/javaee (mvn321)$ mvn -Drevision=2.0-SNAPSHOT clean package
          [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.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ domain ---
          [INFO] Deleting /Users/kama/ws-git/javaee/domain/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ domain ---
          [INFO]
          [INFO] --- maven-resources-plugin:2.6: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.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:2.6: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.1:testCompile (default-testCompile) @ domain ---
          [INFO] No sources to compile
          [INFO]
          [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ domain ---
          [INFO] No tests to run.
          [INFO]
          [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ domain ---
          [INFO] Building jar: /Users/kama/ws-git/javaee/domain/target/domain-2.0-SNAPSHOT.jar
          [INFO]
          [INFO] ------------------------------------------------------------------------
          [INFO] Building service-client 2.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ service-client ---
          [INFO] Deleting /Users/kama/ws-git/javaee/service-client/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ service-client ---
          [INFO]
          [INFO] --- maven-resources-plugin:2.6: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.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:2.6: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.1:testCompile (default-testCompile) @ service-client ---
          [INFO] No sources to compile
          [INFO]
          [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ service-client ---
          [INFO] No tests to run.
          [INFO]
          [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ service-client ---
          [INFO] Building jar: /Users/kama/ws-git/javaee/service-client/target/service-client-2.0-SNAPSHOT.jar
          [INFO]
          [INFO] ------------------------------------------------------------------------
          [INFO] Building webgui 2.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/maven-metadata.xml
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/maven-metadata.xml (780 B at 1.5 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.pom
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.pom (788 B at 64.1 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/maven-metadata.xml
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/maven-metadata.xml (607 B at 0.4 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/parent-1.1.2-20151128.003509-1.pom
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/parent-1.1.2-20151128.003509-1.pom (2 KB at 123.7 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.jar
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.jar (4 KB at 203.3 KB/sec)
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ webgui ---
          [INFO] Deleting /Users/kama/ws-git/javaee/webgui/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ webgui ---
          [INFO]
          [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ webgui ---
          [INFO] Using 'UTF-8' encoding to copy filtered resources.
          [INFO] Copying 0 resource
          [INFO]
          [INFO] --- maven-compiler-plugin:3.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:2.6: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.1:testCompile (default-testCompile) @ webgui ---
          [INFO] No sources to compile
          [INFO]
          [INFO] --- maven-surefire-plugin:2.18.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.0-SNAPSHOT]
          [INFO] Processing war project
          [INFO] Copying webapp resources [/Users/kama/ws-git/javaee/webgui/src/main/webapp]
          [INFO] Webapp assembled in [43 msecs]
          [INFO] Building war: /Users/kama/ws-git/javaee/webgui/target/webgui-2.0-SNAPSHOT.war
          [INFO]
          [INFO] ------------------------------------------------------------------------
          [INFO] Building service 2.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ service ---
          [INFO] Deleting /Users/kama/ws-git/javaee/service/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ service ---
          [INFO]
          [INFO] --- maven-resources-plugin:2.6: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.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:2.6: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.1:testCompile (default-testCompile) @ service ---
          [INFO] No sources to compile
          [INFO]
          [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ service ---
          [INFO] No tests to run.
          [INFO]
          [INFO] --- maven-ejb-plugin:2.3:ejb (default-ejb) @ service ---
          [INFO] Building EJB service-2.0-SNAPSHOT with EJB version 3.1
          [INFO] Building jar: /Users/kama/ws-git/javaee/service/target/service-2.0-SNAPSHOT.jar
          [INFO]
          [INFO] ------------------------------------------------------------------------
          [INFO] Building app 2.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/maven-metadata.xml
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/maven-metadata.xml (788 B at 1.8 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.pom
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.pom (641 B at 44.7 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.jar
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.jar (4 KB at 207.2 KB/sec)
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ app ---
          [INFO] Deleting /Users/kama/ws-git/javaee/app/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ app ---
          [INFO]
          [INFO] --- maven-ear-plugin:2.6:generate-application-xml (default-generate-application-xml) @ app ---
          [INFO] Generating application.xml
          [INFO]
          [INFO] --- maven-resources-plugin:2.6: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.6:ear (default-ear) @ app ---
          [INFO] Copying artifact[war:com.soebes.examples.j2ee:webgui:2.0-SNAPSHOT] to[webgui-2.0-SNAPSHOT.war]
          [INFO] Copying artifact[ejb:com.soebes.examples.j2ee:service:2.0-SNAPSHOT] to[service-2.0-SNAPSHOT.jar]
          [INFO] Copying artifact[jar:com.soebes.examples.j2ee:service-client:1.1.2-20151128.003510-1] to[service-client-1.1.2-SNAPSHOT.jar]
          [INFO] Copying artifact[jar:com.soebes.examples.j2ee:domain:1.1.2-20151128.003509-1] to[domain-1.1.2-SNAPSHOT.jar]
          [INFO] Copying artifact[jar:junit:junit:4.11] to[junit-4.11.jar]
          [INFO] Copying artifact[jar:org.hamcrest:hamcrest-core:1.3] to[hamcrest-core-1.3.jar]
          [INFO] Copying artifact[jar:org.testng:testng:6.8.8] to[testng-6.8.8.jar]
          [INFO] Copying artifact[jar:org.beanshell:bsh:2.0b4] to[bsh-2.0b4.jar]
          [INFO] Copying artifact[jar:com.beust:jcommander:1.35] to[jcommander-1.35.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.0-SNAPSHOT/META-INF/MANIFEST.MF - Generating one
          [INFO] Building jar: /Users/kama/ws-git/javaee/app/target/app-2.0-SNAPSHOT.ear
          [INFO]
          [INFO] ------------------------------------------------------------------------
          [INFO] Building appasm 2.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ appasm ---
          [INFO] Deleting /Users/kama/ws-git/javaee/appasm/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ appasm ---
          [INFO]
          [INFO] --- appassembler-maven-plugin:1.10:assemble (package) @ appasm ---
          [INFO] Installing artifact /Users/kama/ws-git/javaee/webgui/target/webgui-2.0-SNAPSHOT.war to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/webgui-2.0-SNAPSHOT.war
          [INFO] Installing artifact /Users/kama/ws-git/javaee/service/target/service-2.0-SNAPSHOT.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/service-2.0-SNAPSHOT.jar
          [INFO] Installing artifact /Users/kama/.m2/repository/junit/junit/4.11/junit-4.11.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/junit-4.11.jar
          [INFO] Installing artifact /Users/kama/.m2/repository/org/testng/testng/6.8.8/testng-6.8.8.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/testng-6.8.8.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.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ shade ---
          [INFO] Deleting /Users/kama/ws-git/javaee/shade/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ shade ---
          [INFO]
          [INFO] --- maven-resources-plugin:2.6: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.1:compile (default-compile) @ shade ---
          [INFO] No sources to compile
          [INFO]
          [INFO] --- maven-resources-plugin:2.6: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.1:testCompile (default-testCompile) @ shade ---
          [INFO] No sources to compile
          [INFO]
          [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ shade ---
          [INFO] No tests to run.
          [INFO]
          [INFO] --- maven-jar-plugin:2.6: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.0-SNAPSHOT.jar
          [INFO]
          [INFO] --- maven-shade-plugin:2.1:shade (test) @ shade ---
          [INFO] Including com.soebes.examples.j2ee:webgui:war:2.0-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:service:ejb:2.0-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:service-client:jar:1.1.2-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:domain:jar:1.1.2-SNAPSHOT in the shaded jar.
          [INFO] Including junit:junit:jar:4.11 in the shaded jar.
          [INFO] Including org.hamcrest:hamcrest-core:jar:1.3 in the shaded jar.
          [INFO] Including org.testng:testng:jar:6.8.8 in the shaded jar.
          [INFO] Including org.beanshell:bsh:jar:2.0b4 in the shaded jar.
          [INFO] Including com.beust:jcommander:jar:1.35 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.1:shade (dev) @ shade ---
          [INFO] Including com.soebes.examples.j2ee:webgui:war:2.0-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:service:ejb:2.0-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:service-client:jar:1.1.2-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:domain:jar:1.1.2-SNAPSHOT in the shaded jar.
          [INFO] Including junit:junit:jar:4.11 in the shaded jar.
          [INFO] Including org.hamcrest:hamcrest-core:jar:1.3 in the shaded jar.
          [INFO] Including org.testng:testng:jar:6.8.8 in the shaded jar.
          [INFO] Including org.beanshell:bsh:jar:2.0b4 in the shaded jar.
          [INFO] Including com.beust:jcommander:jar:1.35 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.1:shade (prod) @ shade ---
          [INFO] Including com.soebes.examples.j2ee:webgui:war:2.0-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:service:ejb:2.0-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:service-client:jar:1.1.2-SNAPSHOT in the shaded jar.
          [INFO] Including com.soebes.examples.j2ee:domain:jar:1.1.2-SNAPSHOT in the shaded jar.
          [INFO] Including junit:junit:jar:4.11 in the shaded jar.
          [INFO] Including org.hamcrest:hamcrest-core:jar:1.3 in the shaded jar.
          [INFO] Including org.testng:testng:jar:6.8.8 in the shaded jar.
          [INFO] Including org.beanshell:bsh:jar:2.0b4 in the shaded jar.
          [INFO] Including com.beust:jcommander:jar:1.35 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.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/maven-metadata.xml
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/maven-metadata.xml (780 B at 1.8 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/webgui-1.1.2-20151128.003510-1.pom
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/webgui-1.1.2-20151128.003510-1.pom (2 KB at 79.3 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/maven-metadata.xml
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/maven-metadata.xml (781 B at 1.9 KB/sec)
          Downloading: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/service-1.1.2-20151128.003510-1.pom
          Downloaded: http://localhost:8081/nexus/content/groups/public/com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/service-1.1.2-20151128.003510-1.pom (2 KB at 108.9 KB/sec)
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ assembly ---
          [INFO] Deleting /Users/kama/ws-git/javaee/assembly/target
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ assembly ---
          [INFO]
          [INFO] --- maven-assembly-plugin:3.0.0-SNAPSHOT: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.0-SNAPSHOT-archive.zip
          [INFO] Building jar: /Users/kama/ws-git/javaee/assembly/target/assembly-2.0-SNAPSHOT-prod.jar
          [INFO] Building jar: /Users/kama/ws-git/javaee/assembly/target/assembly-2.0-SNAPSHOT-dev.jar
          [INFO]
          [INFO] ------------------------------------------------------------------------
          [INFO] Building parent 2.0-SNAPSHOT
          [INFO] ------------------------------------------------------------------------
          [INFO]
          [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ parent ---
          [INFO]
          [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ parent ---
          [INFO] ------------------------------------------------------------------------
          [INFO] Reactor Summary:
          [INFO]
          [INFO] domain ............................................. SUCCESS [  1.421 s]
          [INFO] service-client ..................................... SUCCESS [  0.066 s]
          [INFO] webgui ............................................. SUCCESS [  2.862 s]
          [INFO] service ............................................ SUCCESS [  0.408 s]
          [INFO] app ................................................ SUCCESS [  0.896 s]
          [INFO] appasm ............................................. SUCCESS [  0.191 s]
          [INFO] shade .............................................. SUCCESS [  1.169 s]
          [INFO] assembly ........................................... SUCCESS [  2.913 s]
          [INFO] parent ............................................. SUCCESS [  0.002 s]
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD SUCCESS
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 10.538 s
          [INFO] Finished at: 2015-12-22T21:34:59+01:00
          [INFO] Final Memory: 53M/453M
          [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...
          Furthermore during the build there will Maven download artifacts with the version 1.1.2-SNAPSHOT which is exactly the version which is defined in the property...So two things:
          Order in reactor is changed, second the property might not be correctly overwritten via command line...

          If i use the master branch of the example project which does not contain property for project version the reactor order is as expected which means parent is first in reactor...

          Show
          khmarbaise Karl Heinz Marbaise added a comment - - edited I'm using the following example project: https://github.com/khmarbaise/javaee (The mvn321 branch of it): So retest with Maven 3.2.5: First run via mvn clean package and than: ~/ws-git/javaee (mvn321)$ mvn -Drevision=2.0-SNAPSHOT clean package [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.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ domain --- [INFO] Deleting /Users/kama/ws-git/javaee/domain/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ domain --- [INFO] [INFO] --- maven-resources-plugin:2.6: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.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:2.6: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.1:testCompile ( default -testCompile) @ domain --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.18.1:test ( default -test) @ domain --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.6:jar ( default -jar) @ domain --- [INFO] Building jar: /Users/kama/ws-git/javaee/domain/target/domain-2.0-SNAPSHOT.jar [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building service-client 2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ service-client --- [INFO] Deleting /Users/kama/ws-git/javaee/service-client/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ service-client --- [INFO] [INFO] --- maven-resources-plugin:2.6: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.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:2.6: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.1:testCompile ( default -testCompile) @ service-client --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.18.1:test ( default -test) @ service-client --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.6:jar ( default -jar) @ service-client --- [INFO] Building jar: /Users/kama/ws-git/javaee/service-client/target/service-client-2.0-SNAPSHOT.jar [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building webgui 2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/maven-metadata.xml Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/maven-metadata.xml (780 B at 1.5 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.pom Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.pom (788 B at 64.1 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/maven-metadata.xml Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/maven-metadata.xml (607 B at 0.4 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/parent-1.1.2-20151128.003509-1.pom Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/parent/1.1.2-SNAPSHOT/parent-1.1.2-20151128.003509-1.pom (2 KB at 123.7 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.jar Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/domain/1.1.2-SNAPSHOT/domain-1.1.2-20151128.003509-1.jar (4 KB at 203.3 KB/sec) [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ webgui --- [INFO] Deleting /Users/kama/ws-git/javaee/webgui/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ webgui --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources ( default -resources) @ webgui --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.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:2.6: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.1:testCompile ( default -testCompile) @ webgui --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.18.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.0-SNAPSHOT] [INFO] Processing war project [INFO] Copying webapp resources [/Users/kama/ws-git/javaee/webgui/src/main/webapp] [INFO] Webapp assembled in [43 msecs] [INFO] Building war: /Users/kama/ws-git/javaee/webgui/target/webgui-2.0-SNAPSHOT.war [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building service 2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ service --- [INFO] Deleting /Users/kama/ws-git/javaee/service/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ service --- [INFO] [INFO] --- maven-resources-plugin:2.6: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.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:2.6: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.1:testCompile ( default -testCompile) @ service --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.18.1:test ( default -test) @ service --- [INFO] No tests to run. [INFO] [INFO] --- maven-ejb-plugin:2.3:ejb ( default -ejb) @ service --- [INFO] Building EJB service-2.0-SNAPSHOT with EJB version 3.1 [INFO] Building jar: /Users/kama/ws-git/javaee/service/target/service-2.0-SNAPSHOT.jar [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building app 2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/maven-metadata.xml Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/maven-metadata.xml (788 B at 1.8 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.pom Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.pom (641 B at 44.7 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.jar Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service-client/1.1.2-SNAPSHOT/service-client-1.1.2-20151128.003510-1.jar (4 KB at 207.2 KB/sec) [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ app --- [INFO] Deleting /Users/kama/ws-git/javaee/app/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ app --- [INFO] [INFO] --- maven-ear-plugin:2.6:generate-application-xml ( default -generate-application-xml) @ app --- [INFO] Generating application.xml [INFO] [INFO] --- maven-resources-plugin:2.6: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.6:ear ( default -ear) @ app --- [INFO] Copying artifact[war:com.soebes.examples.j2ee:webgui:2.0-SNAPSHOT] to[webgui-2.0-SNAPSHOT.war] [INFO] Copying artifact[ejb:com.soebes.examples.j2ee:service:2.0-SNAPSHOT] to[service-2.0-SNAPSHOT.jar] [INFO] Copying artifact[jar:com.soebes.examples.j2ee:service-client:1.1.2-20151128.003510-1] to[service-client-1.1.2-SNAPSHOT.jar] [INFO] Copying artifact[jar:com.soebes.examples.j2ee:domain:1.1.2-20151128.003509-1] to[domain-1.1.2-SNAPSHOT.jar] [INFO] Copying artifact[jar:junit:junit:4.11] to[junit-4.11.jar] [INFO] Copying artifact[jar:org.hamcrest:hamcrest-core:1.3] to[hamcrest-core-1.3.jar] [INFO] Copying artifact[jar:org.testng:testng:6.8.8] to[testng-6.8.8.jar] [INFO] Copying artifact[jar:org.beanshell:bsh:2.0b4] to[bsh-2.0b4.jar] [INFO] Copying artifact[jar:com.beust:jcommander:1.35] to[jcommander-1.35.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.0-SNAPSHOT/META-INF/MANIFEST.MF - Generating one [INFO] Building jar: /Users/kama/ws-git/javaee/app/target/app-2.0-SNAPSHOT.ear [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building appasm 2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ appasm --- [INFO] Deleting /Users/kama/ws-git/javaee/appasm/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ appasm --- [INFO] [INFO] --- appassembler-maven-plugin:1.10:assemble ( package ) @ appasm --- [INFO] Installing artifact /Users/kama/ws-git/javaee/webgui/target/webgui-2.0-SNAPSHOT.war to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/webgui-2.0-SNAPSHOT.war [INFO] Installing artifact /Users/kama/ws-git/javaee/service/target/service-2.0-SNAPSHOT.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/service-2.0-SNAPSHOT.jar [INFO] Installing artifact /Users/kama/.m2/repository/junit/junit/4.11/junit-4.11.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/junit-4.11.jar [INFO] Installing artifact /Users/kama/.m2/repository/org/testng/testng/6.8.8/testng-6.8.8.jar to /Users/kama/ws-git/javaee/appasm/target/appassembler/repo/testng-6.8.8.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.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ shade --- [INFO] Deleting /Users/kama/ws-git/javaee/shade/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ shade --- [INFO] [INFO] --- maven-resources-plugin:2.6: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.1:compile ( default -compile) @ shade --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6: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.1:testCompile ( default -testCompile) @ shade --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.18.1:test ( default -test) @ shade --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.6: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.0-SNAPSHOT.jar [INFO] [INFO] --- maven-shade-plugin:2.1:shade (test) @ shade --- [INFO] Including com.soebes.examples.j2ee:webgui:war:2.0-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:service:ejb:2.0-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:service-client:jar:1.1.2-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:domain:jar:1.1.2-SNAPSHOT in the shaded jar. [INFO] Including junit:junit:jar:4.11 in the shaded jar. [INFO] Including org.hamcrest:hamcrest-core:jar:1.3 in the shaded jar. [INFO] Including org.testng:testng:jar:6.8.8 in the shaded jar. [INFO] Including org.beanshell:bsh:jar:2.0b4 in the shaded jar. [INFO] Including com.beust:jcommander:jar:1.35 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.1:shade (dev) @ shade --- [INFO] Including com.soebes.examples.j2ee:webgui:war:2.0-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:service:ejb:2.0-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:service-client:jar:1.1.2-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:domain:jar:1.1.2-SNAPSHOT in the shaded jar. [INFO] Including junit:junit:jar:4.11 in the shaded jar. [INFO] Including org.hamcrest:hamcrest-core:jar:1.3 in the shaded jar. [INFO] Including org.testng:testng:jar:6.8.8 in the shaded jar. [INFO] Including org.beanshell:bsh:jar:2.0b4 in the shaded jar. [INFO] Including com.beust:jcommander:jar:1.35 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.1:shade (prod) @ shade --- [INFO] Including com.soebes.examples.j2ee:webgui:war:2.0-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:service:ejb:2.0-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:service-client:jar:1.1.2-SNAPSHOT in the shaded jar. [INFO] Including com.soebes.examples.j2ee:domain:jar:1.1.2-SNAPSHOT in the shaded jar. [INFO] Including junit:junit:jar:4.11 in the shaded jar. [INFO] Including org.hamcrest:hamcrest-core:jar:1.3 in the shaded jar. [INFO] Including org.testng:testng:jar:6.8.8 in the shaded jar. [INFO] Including org.beanshell:bsh:jar:2.0b4 in the shaded jar. [INFO] Including com.beust:jcommander:jar:1.35 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.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/maven-metadata.xml Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/maven-metadata.xml (780 B at 1.8 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/webgui-1.1.2-20151128.003510-1.pom Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/webgui/1.1.2-SNAPSHOT/webgui-1.1.2-20151128.003510-1.pom (2 KB at 79.3 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/maven-metadata.xml Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/maven-metadata.xml (781 B at 1.9 KB/sec) Downloading: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/service-1.1.2-20151128.003510-1.pom Downloaded: http: //localhost:8081/nexus/content/groups/ public /com/soebes/examples/j2ee/service/1.1.2-SNAPSHOT/service-1.1.2-20151128.003510-1.pom (2 KB at 108.9 KB/sec) [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ assembly --- [INFO] Deleting /Users/kama/ws-git/javaee/assembly/target [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ assembly --- [INFO] [INFO] --- maven-assembly-plugin:3.0.0-SNAPSHOT: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.0-SNAPSHOT-archive.zip [INFO] Building jar: /Users/kama/ws-git/javaee/assembly/target/assembly-2.0-SNAPSHOT-prod.jar [INFO] Building jar: /Users/kama/ws-git/javaee/assembly/target/assembly-2.0-SNAPSHOT-dev.jar [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building parent 2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean ( default -clean) @ parent --- [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ parent --- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] domain ............................................. SUCCESS [ 1.421 s] [INFO] service-client ..................................... SUCCESS [ 0.066 s] [INFO] webgui ............................................. SUCCESS [ 2.862 s] [INFO] service ............................................ SUCCESS [ 0.408 s] [INFO] app ................................................ SUCCESS [ 0.896 s] [INFO] appasm ............................................. SUCCESS [ 0.191 s] [INFO] shade .............................................. SUCCESS [ 1.169 s] [INFO] assembly ........................................... SUCCESS [ 2.913 s] [INFO] parent ............................................. SUCCESS [ 0.002 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.538 s [INFO] Finished at: 2015-12-22T21:34:59+01:00 [INFO] Final Memory: 53M/453M [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... Furthermore during the build there will Maven download artifacts with the version 1.1.2-SNAPSHOT which is exactly the version which is defined in the property...So two things: Order in reactor is changed, second the property might not be correctly overwritten via command line... If i use the master branch of the example project which does not contain property for project version the reactor order is as expected which means parent is first in reactor...
          Hide
          khmarbaise Karl Heinz Marbaise added a comment -

          The attached file contains the differences between the master branch and the mvn321 branch which seemed to be causing the change in reactor order.

          Show
          khmarbaise Karl Heinz Marbaise added a comment - The attached file contains the differences between the master  branch and the mvn321 branch which seemed to be causing the change in reactor order.
          Hide
          khmarbaise Karl Heinz Marbaise added a comment -

          The ordering issues seemed to be caused by the not replaced placeholders which are existing during the running of the model reading and interpolation.

          The problem in general seemed to be located based on that the parent of the model is not interpolated which means the placeholders like changelist, revision and sha1 are keept without replaced with their appropriate values.

          Show
          khmarbaise Karl Heinz Marbaise added a comment - The ordering issues seemed to be caused by the not replaced placeholders which are existing during the running of the model reading and interpolation. The problem in general seemed to be located based on that the parent of the model is not interpolated which means the placeholders like changelist , revision and sha1 are keept without replaced with their appropriate values.
          Hide
          khmarbaise Karl Heinz Marbaise added a comment -

          So reactor order is documented in MNG-6057 overwriting via command line is something different.

          Show
          khmarbaise Karl Heinz Marbaise added a comment - So reactor order is documented in MNG-6057 overwriting via command line is something different.
          Hide
          khmarbaise Karl Heinz Marbaise added a comment -

          After more investigation and checking the DefaultModelCache which is involved but does not contain the versions which are not correct.

          Show
          khmarbaise Karl Heinz Marbaise added a comment - After more investigation and checking the DefaultModelCache which is involved but does not contain the versions which are not correct.
          Hide
          khmarbaise Karl Heinz Marbaise added a comment -

          So some more informations. I have dived more into this and found the following in Maven Core:
          the calss DefaultArtifactResolver:

              public ArtifactResolutionResult resolve( ArtifactResolutionRequest request )
              {
                  ......
                  if ( request.isResolveTransitively() )
                  {
                      MetadataResolutionRequest metadataRequest = new DefaultMetadataResolutionRequest( request );
          
                      metadataRequest.setArtifact( rootArtifact );
                      metadataRequest.setResolveManagedVersions( managedVersions == null );
          
                      try
                      {
                          ResolutionGroup resolutionGroup = source.retrieve( metadataRequest );
          
                          if ( managedVersions == null )
                          {
                              managedVersions = resolutionGroup.getManagedVersions();
                          }
          
                          Set<Artifact> directArtifacts = resolutionGroup.getArtifacts();
          
                          if ( artifacts == null || artifacts.isEmpty() )
                          {
                              artifacts = directArtifacts;
                          }
                          else
                          {
                              List<Artifact> allArtifacts = new ArrayList<>();
                              allArtifacts.addAll( artifacts );
                              allArtifacts.addAll( directArtifacts );
          
                              Map<String, Artifact> mergedArtifacts = new LinkedHashMap<>();
                              for ( Artifact artifact : allArtifacts )
                              {
                                  String conflictId = artifact.getDependencyConflictId();
                                  if ( !mergedArtifacts.containsKey( conflictId ) )
                                  {
                                      mergedArtifacts.put( conflictId, artifact );
                                  }
                              }
          
                              artifacts = new LinkedHashSet<>( mergedArtifacts.values() );
                          }
          
                          collectionRequest = new ArtifactResolutionRequest( request );
                          collectionRequest.setServers( request.getServers() );
                          collectionRequest.setMirrors( request.getMirrors() );
                          collectionRequest.setProxies( request.getProxies() );
                          collectionRequest.setRemoteRepositories( resolutionGroup.getResolutionRepositories() );
                      }
                      catch ( ArtifactMetadataRetrievalException e )
                      {
                          ArtifactResolutionException are =
                              new ArtifactResolutionException( "Unable to get dependency information for " + rootArtifact.getId()
                                  + ": " + e.getMessage(), rootArtifact, metadataRequest.getRemoteRepositories(), e );
                          result.addMetadataResolutionException( are );
                          return result;
                      }
                  }
          
                  if ( artifacts == null || artifacts.isEmpty() )
                  {
                      if ( request.isResolveRoot() )
                      {
                          result.addArtifact( rootArtifact );
                      }
                      return result;
                  }
          
          

          So the lines:

                          ResolutionGroup resolutionGroup = source.retrieve( metadataRequest );
          
                          if ( managedVersions == null )
                          {
                              managedVersions = resolutionGroup.getManagedVersions();
                          }
          
                          Set<Artifact> directArtifacts = resolutionGroup.getArtifacts();
          

          Producing the wrong version. directArtifacts contains artifacts with the wrong versions..

          The artifacts contains the following correct artifacts:

          com.soebes.examples.j2ee:webgui:war:2.0.0
          com.soebes.examples.j2ee:service:ejb:2.0.0
          com.soebes.examples.j2ee:shade:jar:2.0.0
          junit:junit:jar:4.12
          org.testng:testng:jar:6.9.8
          log4j:log4j:jar:1.2.16
          

          And the directArtifacts contains the artifacts with the wrong versions:

          com.soebes.examples.j2ee:webgui:war:1.7.2-SNAPSHOT
          com.soebes.examples.j2ee:service:ejb:1.7.2-SNAPSHOT
          com.soebes.examples.j2ee:shade:jar:1.7.2-SNAPSHOT
          junit:junit:jar:4.12
          org.testng:testng:jar:6.9.8
          log4j:log4j:jar:1.2.16
          

          So what I don't understand is the need for this:

                          ResolutionGroup resolutionGroup = source.retrieve( metadataRequest );
          
                          if ( managedVersions == null )
                          {
                              managedVersions = resolutionGroup.getManagedVersions();
                          }
          

          What should be resolved here? Cause all artifacts are already there ? And from where do those wrong versions are coming from ?

          Show
          khmarbaise Karl Heinz Marbaise added a comment - So some more informations. I have dived more into this and found the following in Maven Core: the calss DefaultArtifactResolver : public ArtifactResolutionResult resolve( ArtifactResolutionRequest request ) { ...... if ( request.isResolveTransitively() ) { MetadataResolutionRequest metadataRequest = new DefaultMetadataResolutionRequest( request ); metadataRequest.setArtifact( rootArtifact ); metadataRequest.setResolveManagedVersions( managedVersions == null ); try { ResolutionGroup resolutionGroup = source.retrieve( metadataRequest ); if ( managedVersions == null ) { managedVersions = resolutionGroup.getManagedVersions(); } Set<Artifact> directArtifacts = resolutionGroup.getArtifacts(); if ( artifacts == null || artifacts.isEmpty() ) { artifacts = directArtifacts; } else { List<Artifact> allArtifacts = new ArrayList<>(); allArtifacts.addAll( artifacts ); allArtifacts.addAll( directArtifacts ); Map< String , Artifact> mergedArtifacts = new LinkedHashMap<>(); for ( Artifact artifact : allArtifacts ) { String conflictId = artifact.getDependencyConflictId(); if ( !mergedArtifacts.containsKey( conflictId ) ) { mergedArtifacts.put( conflictId, artifact ); } } artifacts = new LinkedHashSet<>( mergedArtifacts.values() ); } collectionRequest = new ArtifactResolutionRequest( request ); collectionRequest.setServers( request.getServers() ); collectionRequest.setMirrors( request.getMirrors() ); collectionRequest.setProxies( request.getProxies() ); collectionRequest.setRemoteRepositories( resolutionGroup.getResolutionRepositories() ); } catch ( ArtifactMetadataRetrievalException e ) { ArtifactResolutionException are = new ArtifactResolutionException( "Unable to get dependency information for " + rootArtifact.getId() + ": " + e.getMessage(), rootArtifact, metadataRequest.getRemoteRepositories(), e ); result.addMetadataResolutionException( are ); return result; } } if ( artifacts == null || artifacts.isEmpty() ) { if ( request.isResolveRoot() ) { result.addArtifact( rootArtifact ); } return result; } So the lines: ResolutionGroup resolutionGroup = source.retrieve( metadataRequest ); if ( managedVersions == null ) { managedVersions = resolutionGroup.getManagedVersions(); } Set<Artifact> directArtifacts = resolutionGroup.getArtifacts(); Producing the wrong version. directArtifacts contains artifacts with the wrong versions.. The artifacts  contains the following correct artifacts: com.soebes.examples.j2ee:webgui:war:2.0.0 com.soebes.examples.j2ee:service:ejb:2.0.0 com.soebes.examples.j2ee:shade:jar:2.0.0 junit:junit:jar:4.12 org.testng:testng:jar:6.9.8 log4j:log4j:jar:1.2.16 And the directArtifacts contains the artifacts with the wrong versions: com.soebes.examples.j2ee:webgui:war:1.7.2-SNAPSHOT com.soebes.examples.j2ee:service:ejb:1.7.2-SNAPSHOT com.soebes.examples.j2ee:shade:jar:1.7.2-SNAPSHOT junit:junit:jar:4.12 org.testng:testng:jar:6.9.8 log4j:log4j:jar:1.2.16 So what I don't understand is the need for this: ResolutionGroup resolutionGroup = source.retrieve( metadataRequest ); if ( managedVersions == null ) { managedVersions = resolutionGroup.getManagedVersions(); } What should be resolved here? Cause all artifacts are already there ? And from where do those wrong versions are coming from ?
          Hide
          khmarbaise Karl Heinz Marbaise added a comment - - edited
          Show
          khmarbaise Karl Heinz Marbaise added a comment - - edited Working version in 82548dbc84bea2e0ab95316c809239dd22433055

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development