ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Weigenand <>
Subject Re: Setting property values programatically
Date Mon, 17 Dec 2001 10:33:57 GMT
Hello Mike, schrieb:
> Hi,
> Is there a way to set the value of a property programatically, similar to
> this piece of shell code:
> SET VALUE=`execute some command`
> I want to create a build number and store it in a property for propagation
> across a few ant tasks.

  <target name="build">
    <propertyfile file="buildnumber">
      <entry key="buildnumber" type="int" default="0" operation="+" />
    <property file="buildnumber" />
    <echo message="buildnumber: ${buildnumber}" />

The above will read in the property file 'buildnumber' and increment the
of the property 'buildnumber' by one.

This value is then save to the property file.

> Failing this, is there a way to instruct ant to reload any properties that
> are loaded from external files?
> Any ideas?

Dirk Weigenand            
SMB GmbH                             

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message