ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: print cvs revision tag ...
Date Fri, 16 Nov 2001 10:11:20 GMT
On Fri, 16 Nov 2001 21:04, Rafal Kedziorski wrote:
> Hallo,
>
> I have following property entry in my build.properties:
>
> build.revision = $Revision: 1.2.4.1 $
>
> And this in build.xml:
>
>     <target name="usage" description="--> usage">
>         <echo message="${build.revision}"/>
>     ...
>     </target>
>
> My output looks:
>
> bash-2.03$ ./build.sh
> Buildfile: build.xml
>
> usage:
>      [echo] Revision: 1.2.4.1 $
>
>
> Is this thru xml parser or Ant small error?

$ is interpreted as the start of a property to be evaluated. If you want $'s 
to appear in your propertys value you have to double them (ie $$). It is odd 
that the end character in your property is coming through as a $. I suspect 
thats a bug in ant. I would have expected it print out

      [echo] Revision: 1.2.4.1 
-- 
Cheers,

Pete

"Artists can color the sky red because they know it's blue.  Those of us who
 aren't artists must color things the way they really are or people might 
 think we're stupid." -- Jules Feiffer 

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


Mime
View raw message