ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: How to add the version number to the deployed project
Date Fri, 09 Aug 2002 02:40:02 GMT
--- "Janusz Dalecki (TYCO)" <> wrote:
> Is there a way of adding a version of the software to the deployed
> property file that consists of major and minor values - like 
> “Build 178.23”. I can’t see that PropertyFile task could help me -
> it only handles int and date.

If you don't mind using <script>:

  <target name="setBuildNumber">
    <property file=""/>
    <script language="javascript"> <![CDATA[
      bldnum = new Double.valueOf((project.getProperty("build.number")));
      newnum = bldnum.doubleValue() + .01;
        (new BigDecimal(newnum).setScale(2,
    <echo>Build number is ${build.number}</echo>
    <propertyfile file="">
      <entry key="build.number" value="${build.number}"/>

If you don't want to use <script>, you could adapt the above to a task.



Do You Yahoo!?
HotJobs - Search Thousands of New Jobs

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

View raw message