You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Alessandro Marino <al...@gmail.com> on 2010/03/09 19:18:11 UTC

Get current module's version in Ant

I've a project with various modules, the last couple of modules are the war
artifacts. How can I inject the module's version in the war Ant task ?

At the moment I'm defining a property in the ivyconfig.xml file and then I
retrieve it when creating the war, but I'm sure that there's a clener way to
do this.

Thanks and regards,
Alessandro

Re: Get current module's version in Ant

Posted by Geoff Clitheroe <g....@gmail.com>.
Hi,

You can use ivy:buildnumber

http://ant.apache.org/ivy/history/latest-milestone/use/buildnumber.html

We are frequently doing releases like 2.0.1-RC2 etc and to switch from an
RC* series to finals we still use a property to be able to override the
build number from the command line.

Cheers,
Geoff


On Wed, Mar 10, 2010 at 7:18 AM, Alessandro Marino
<al...@gmail.com>wrote:

> I've a project with various modules, the last couple of modules are the war
> artifacts. How can I inject the module's version in the war Ant task ?
>
> At the moment I'm defining a property in the ivyconfig.xml file and then I
> retrieve it when creating the war, but I'm sure that there's a clener way
> to
> do this.
>
> Thanks and regards,
> Alessandro
>