ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: Property dereference via id gives odd result
Date Tue, 25 Apr 2006 16:30:23 GMT
Try <echo message="${test.STARTTIME}"/>, since ${ant.project.name} is
set to "test".

-Rob Anderson

> -----Original Message-----
> From: barf barf [mailto:foof890@hotmail.com] 
> Sent: Tuesday, April 25, 2006 9:01 AM
> To: user@ant.apache.org
> Subject: Property dereference via id gives odd result
> 
> I am attempting to make use of the property deferencing trick 
> described in "Java Development with Ant", and am seeing 
> something odd. Here's a short
> example:
> 
> <project name="test" basedir=".">
>     <tstamp>
>         <format property="${ant.project.name}.STARTTIME" 
> pattern="MM/dd/yyyy hh:mm aa"
>                     id="ts"/>
>     </tstamp>
>     <property name="project.ts" refid="ts"/>
>     <echo message="${project.ts}"/>
> </project>
> 
> produces the following output with ant 1.6.5:
> 
> Buildfile: build.xml
>      [echo] org.apache.tools.ant.taskdefs.Tstamp$CustomFormat@1d63e39
> 
> BUILD SUCCESSFUL
> 
> I realize that 'id' is not listed as an attribute for the 
> format element, I just tried it to see if it might work. I 
> would have expected an error rather than what I got.
> 
> So, that said, anyone have a mean with ant along to set the 
> tstamp property based on some other property and then be able 
> to access it ? Thanks!
> 
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


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


Mime
View raw message