ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Moore <wbmo...@fedex.com>
Subject ant and cvs
Date Mon, 19 Jan 2004 13:28:34 GMT
Hi all. I'm new to building ant build.xml files.

I'm trying to build a mechanism in the build file that wil allow me to 
check out a tagged file and grab the tag from a version.properties file.

I have these lines in the file:
version=$Name: $
author=$Author: $

Now the Name is expanded to the name of the tag and the Author is 
expanded to the username when I delete the file and check it out again 
using the tag -- IF I use wincvs. so these lines look like this:
version=$Name: This-Is-My-Tag $
author=$Author: myUserName $

That works ok. My problem comes in when I try to do the same thing using 
ant 1.6.0.
These lines get expanded like:
version=$Name\: This-Is-My-Tag $
author=$Author\: myUserName $

Now, if I check this in and then do a check out again of this file, The 
$Name: $ and $Author: $ keywords do not get expanded, because they have 
'\:' instead of ':'.

This contains the interesting lines of my build file:
==================================================
<!--  Create new version.properties and delete tag files -->
    <target name="makeversion" description="create the needed files so 
jar will have tag within it.">
<!-- Get a build time -->
    <tstamp>
           <format property="buildtime.isoformat" 
pattern="yyyy-MM-dd'T'HH:mm:ss"/>
    </tstamp>
    <!--  Modify the properties file by incrementing the build number 
and the build time -->
    <delete file="${src}/version.properties"/>
    <cvs command="update version.properties"/>
    <propertyfile file="version.properties" comment="Version properties">
              <entry key="release" type="int" operation="+" default="0"/>
              <entry key="build" type="int" value="0"/>
              <entry key="build.time" type="string" 
value="${DSTAMP}_${TSTAMP}"/>
     </propertyfile>
     <!-- Load the new properties -->
     <property file="version.properties" prefix="version"/>
</target>
====================================================

How do I fix this?

Thanks.
Walter Moore



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message