pgier wrote:
Can you try just echoing one of the properties that you are passing?
Since i suspect that it's the maven:dependencies in the "init-dependencies" target of build/build.xml, i added a echo statement to print one of the system properties being passed before the call to maven:dependencies. I then added one more echo statement after the maven:dependencies to print out the resolved version numbers (stored in the pom.dependencies.versions property):
Index: build.xml
===================================================================
--- build.xml (revision 101012)
+++ build.xml (working copy)
@@ -40,7 +40,7 @@
<!-- Set a default file to use to define the thirdparty dependencies. -->
<property name="dist.pom.file" location="pom.xml"/>
-
+ <echo>Property passed from command line ${version.org.jboss.ejb3}</echo>
<!--
- Initialize properties for each dependency in the thirdparty pom
- The properties take the form "groupId:artifactId:packaging"
@@ -51,6 +51,7 @@
scopes="compile, runtime">
<pom refid="pom.project"/>
</maven:dependencies>
+ <echo>versions are: ${pom.dependencies.versions}</echo>
<mapper id="remove-versions" classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
I then ran mvn clean install from AS-trunk/build folder with the following properties (In this example the property -Dversion.org.jboss.ejb3 in that command line is the one that we are interested in):
mvn clean install -Dskip-download-sources -Dversion.org.jboss.ejb3=\(,1.0] -Dversion.org.jboss.ejb3.common.client=[0,\)
-Dversion.org.jboss.ejb3.core.client=[0,\) -Dversion.org.jboss.ejb3.proxy.client=[0,\)
-Dversion.org.jboss.ejb3.proxy.clustered.client=[0,\)
-Dversion.org.jboss.ejb3.security.client=[0,\) -Dversion.org.jboss.ejb3.jpa.int=[0,\)
-Dversion.org.jboss.metadata.ejb=[0,\)
So i am passing -Dversion.org.jboss.ejb3=\(,1.0] (i.e. version <=1.0). The version specified in component-matrix/pom.xml for this artifact is 1.0.4. After running the command, here's the output:
init-dependencies:
[echo] Property passed from command line (,1.0]
[echo] versions are: 2.0.0-alpha-10:1.0.0-Beta-1:1.5.0.GA:6.0.0-20100216.180345-703:
6.0.0-20100216.180345-702:2.1.1.GA:3.0.1-native-2.0.4.GA:1.0.0.GA:
1.8.0:3.11.0.GA:3.0.0.GA:1.0-alpha-1:1.0:6.0.0-20100216.180345-705:1.0.0-CR-1:1.3:1.2:
6.0.0-20100216.180345-708:1.2.14:1.1:1.0_02.CR2:2.0.1:2.0.0:2.0.2-FCS:2.1.1.SP1:3.2.0.Beta1:
2.7.0.patch02-brew:1:2.0.0.CR3:1.1b:1.1.0.GA_SP1:1.0.0.Alpha1:1.0.0.Alpha2:3.2.1.GA:
6.0.0-20100216.180345-725:1.3.0:6.0.0-20100216.180345-723:6.0.0-20100216.180345-721:1.0.12-brew:
1.2.0.GA:0.3.4:3.0.0.GA_SP1:1.4.0.Beta1:6.0.0-Alpha8:1.0.0.CR7:5.2.0.Beta1:5.0.4.GA:
1.0.0.CR2:1.8.0.8-brew:1.0.0.CR3:3.1.0.GA:1.1.0:1.4.6.GA:1.1.1:2.2.17.GA:
1.0.3.GA:6.0.0-20100216.180345-713:0.1.0:1.0.2.GA:2.0.5.CR1:0.1.4:1.0.0.CR16:
1.1.0.GA:3.3.0.Beta3:3.3.0.Beta2:1.7.1:6.0.0-20100216.180345-715:1.5.2:2.1.2.GA:1.1-brew:
2.6.13.GA:6.0.0-20100216.180345-743:2.5-20081211:6.0.0-20100216.180345-740:2.5.6:6.0.0.Beta6:
6.0.0-20100216.180345-746:1.21-brew:1.5.6:6.0.0.Beta5:6.0.0-20100216.180345-749:
6.0.0-20100216.180345-748:3.0.0-beta-2:2.0.0.GA:1.1.0.Beta1:2.1.1:3.5.0-CR-1:2.1.3:2.1.8.GA:2.2.0.CR1:
4.0.2.GA:2.0-b01:5.0.3.GA:2.0.0.Alpha:2.0.0.Alpha13:6.1.16:6.0.0-20100216.180345-738:4.9.0.GA:2.5.2.SP2:
1.1.0.jboss:2.0.3.SP1:20050927:2.9.1:1.0-RC2:2.2.0.Alpha2:2.2.0.Alpha1:2.1.0.20091223:2.2.0.Alpha6:0.9RC4:
1.3.4-jboss-update1:2.0.0-alpha-1:3.2.3:2.0.0-alpha-4:0.1.0-alpha-2:2.0.0-alpha-3:3.2.6:2.0.0-alpha-2:2.1.0.CR1:
1.0.1.GA:2.0.0-alpha-6:3.0.4.GA:2.0.0.Alpha2:6.0.0-20100216.180345-381:1.4jboss:1.6.1:
1.0.4-20100215.041517-66:3.1:6.0.0-20100216.180345-750:1.0.2:1.0.1:5.1.0.CR1:5.1:1.0.0:1.0-MR1:
1.0.6:1.3.0.Beta2:1.0.4:2.7.6-brew:1.0.3:2.0.2.Beta3:2.2:1.0.0-alpha-4:1.2.2:1.2.8:1.4.3:2.4.0:
1.1.1.GA:2.3.1jboss.patch01-brew:1.4.2
The first echo statement output shows that the property is being correctly passed. The second echo statement output (after maven:dependencies) shows that the version is being resolved to 1.0.4 (i.e. the one specified in component-matrix). Search for the string ":1.0.4:" in that echo statement output. So looks like the version range is completely ignored
For the sake of testing, i then passed an explicit version override of 1.0.3 (i.e. not a version range) from the command line:
mvn clean install -Dskip-download-sources -Dversion.org.jboss.ejb3=1.0.3 -Dversion.org.jboss.ejb3.common.client=[0,\)
-Dversion.org.jboss.ejb3.core.client=[0,\) -Dversion.org.jboss.ejb3.proxy.client=[0,\)
-Dversion.org.jboss.ejb3.proxy.clustered.client=[0,\)
-Dversion.org.jboss.ejb3.security.client=[0,\) -Dversion.org.jboss.ejb3.jpa.int=[0,\)
-Dversion.org.jboss.metadata.ejb=[0,\)
And here's the output:
init-dependencies:
[echo] Property passed from command line 1.0.3
[echo] versions are: 2.0.0-alpha-10:1.0.0-Beta-1:1.5.0.GA:6.0.0-20100216.180345-703:6.0.0-20100216.180345-702:
2.1.1.GA:3.0.1-native-2.0.4.GA:1.0.0.GA:1.8.0:3.11.0.GA:3.0.0.GA:1.0-alpha-1:1.0:6.0.0-20100216.180345-705:
1.0.0-CR-1:1.3:1.2:6.0.0-20100216.180345-708:1.2.14:1.1:1.0_02.CR2:2.0.1:2.0.0:2.0.2-FCS:2.1.1.SP1:
3.2.0.Beta1:2.7.0.patch02-brew:1:2.0.0.CR3:1.1b:1.1.0.GA_SP1:1.0.0.Alpha1:1.0.0.Alpha2:3.2.1.GA:
6.0.0-20100216.180345-725:1.3.0:6.0.0-20100216.180345-723:6.0.0-20100216.180345-721:1.0.12-brew:1.2.0.GA:
0.3.4:3.0.0.GA_SP1:1.4.0.Beta1:6.0.0-Alpha8:1.0.0.CR7:5.2.0.Beta1:5.0.4.GA:1.0.0.CR2:1.8.0.8-brew:
1.0.0.CR3:3.1.0.GA:1.1.0:1.4.6.GA:1.1.1:2.2.17.GA:1.0.3.GA:6.0.0-20100216.180345-713:0.1.0:
1.0.2.GA:2.0.5.CR1:0.1.4:1.0.0.CR16:1.1.0.GA:3.3.0.Beta3:3.3.0.Beta2:1.7.1:6.0.0-20100216.180345-715:
1.5.2:2.1.2.GA:1.1-brew:2.6.13.GA:6.0.0-20100216.180345-743:2.5-20081211:6.0.0-20100216.180345-740:2.5.6:
6.0.0.Beta6:6.0.0-20100216.180345-746:1.21-brew:1.5.6:6.0.0.Beta5:6.0.0-20100216.180345-749:
6.0.0-20100216.180345-748:3.0.0-beta-2:2.0.0.GA:1.1.0.Beta1:2.1.1:3.5.0-CR-1:2.1.3:2.1.8.GA:
2.2.0.CR1:4.0.2.GA:2.0-b01:5.0.3.GA:2.0.0.Alpha:2.0.0.Alpha13:6.1.16:6.0.0-20100216.180345-738:
4.9.0.GA:2.5.2.SP2:1.1.0.jboss:2.0.3.SP1:20050927:2.9.1:1.0-RC2:2.2.0.Alpha2:2.2.0.Alpha1:
2.1.0.20091223:2.2.0.Alpha6:0.9RC4:1.3.4-jboss-update1:2.0.0-alpha-1:3.2.3:2.0.0-alpha-4:0.1.0-alpha-2:
2.0.0-alpha-3:3.2.6:2.0.0-alpha-2:2.1.0.CR1:1.0.1.GA:2.0.0-alpha-6:3.0.4.GA:2.0.0.Alpha2:
6.0.0-20100216.180345-381:1.4jboss:1.6.1:1.0.4-20100215.041517-66:3.1:6.0.0-20100216.180345-750:
1.0.2:1.0.1:5.1.0.CR1:5.1:1.0.0:1.0-MR1:1.0.6:1.3.0.Beta2:2.7.6-brew:1.0.3:2.0.2.Beta3:2.2:
1.0.0-alpha-4:1.2.1:1.2.2:1.2.8:1.4.3:2.4.0:1.1.1.GA:2.3.1jboss.patch01-brew:1.4.2
The echo statement after the maven:dependencies, shows that it picked up the version override and correctly resolved the version to 1.0.3 (search for ":1.0.3:") instead of the one specified in component-matrix/pom.xml.
So this appears to be something around the maven:dependencies and it's version range resolution.