Hi all,
I am using Maven ANT tasks to deploy a number of JAR files I produce as part of
my build. For each JAR file I have a corresponding pom.xml file (not called
pom.xml however:) ).
I define references to these files in my build script as follows:
<artifact:pom id="xxx.pom" file="xxx.xml"/>
And later refer to them when I want to deploy as follows:
<artifact:deploy file="xxx.jar">
<remoteRepository refid="my-repository"/>
<pom refid="xxx.pom"/>
</artifact:deploy>
Since I have multiple pom files (one for each JAR file to deploy) I need to set
the version of the JAR artifacts in every pom file. To avoid having to do this
I tried adding a property <deploy.version> inside of my settings.xml as follows:
<settings>
...
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
...
<properties>
<deploy.version>version_number</deploy.version>
</properties>
...
</profile>
</profiles>
...
</settings>
I have then put ${deploy.version} inside of the version tag of each of my poms.
The issue is that when I run my ANT deploy task this variable is not translated
from ${deploy.version}, however, if I rename each of the pom files to pom.xml
and run "mvn help:effective-pom" then the property name is appropriately
substituted with whatever I have set <deploy.version> to in settings.xml.
My question is... why is there this inconsistency in substitution?
Any help would be greatly appreciated.
Kind Regards,
Matt
_________________________________________________________________
Telly addicts unite!
http://www.searchgamesbox.com/tvtown.shtml