maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Publishing POMs via Maven and inserting build version info
Date Tue, 02 Feb 2010 11:39:02 GMT
don't use property substitution in XPath:
    /project(/parent)?/(groupId|artifactId|version|packaging)
as they are not supported

On 2 February 2010 10:01, Brian Agnew <brian@oopsconsultancy.com> wrote:

> Hello -
>
> I posted the below to StackOverflow, then I figured that this may be a
> better forum.
>
>
> http://stackoverflow.com/questions/2183015/publishing-poms-via-maven-and-inserting-build-version-info
>
> I'm building Maven projects via TeamCity/Git and trying to insert the
> TeamCity build numbers in the pom.xml that gets published to my repository
> upon a successful build. Unfortunately I can't determine how to publish a
> pom.xml with the substitutions inserted.
>
> My pom.xml contains info like:
>
> <version>${build.number}</version>
>
> where build.number is provided by TeamCity. That all builds ok, and if
> (say) build.number = 0.1, then the deployment is a pom.xml to a directory
> with 0.1. All well and good.
>
> However, the pom.xml that is deployed is the pom.xml without the
> substitutions made. i.e. Maven is running with a pom.xml with appropriate
> substitutions, but deploys the initial version and so I get
>
> <version>${build.number}</version>
>
> in the final pom.xml. How can I get the build version number in the pom.xml
> ?
>
> Apologies for the post length.
>
> Brian
>
> --
> Brian Agnew                  http://www.oopsconsultancy.com
> OOPS Consultancy Ltd
> Tel: +44 (0)7720 397526
> Fax: +44 (0)20 8682 0012
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message