| Location attribute in property not resolving correctly | Location attribute in property not resolving correctly 2006-09-26 - By Rebhan, Gilbert
Hi,
still don't get it, sorry. I've tried with <target name="depends">
<timestampselector outputsetid="mypath" count="1" age="eldest" > <path> <fileset dir="Y:/bla"> <include name="*.jar" /> </fileset> </path> </timestampselector>
<pathconvert refid="mypath" property="myfixedpath" targetos="unix"/>
<echo>myfixedpath === ${myfixedpath}</echo>
<echo file="Y:/bla/foobar.properties">filepath=${myfixedpath}</echo> </target>
<target name="main" depends="depends"> <propertyfile file="Y:/bla/foobar.properties" /> <echo>Targetfile === ${filepath}</echo> </target>
Result [pathconvert] Set property myfixedpath = Y:/bla/corba.jar Setting project property: myfixedpath -> Y:/bla/corba.jar [echo] myfixedpath === Y:/bla/corba.jar main: [propertyfile] Updating property file: Y:\bla\foobar.properties Property ${filepath} has not been set [echo] Targetfile === ${filepath}
The foobar.properties looks like #Tue Sep 26 17:40:31 CEST 2006 filepath=Y\:/bla/corba.jar
The pathconvert works but when echoing to a file it gets Y\: ?!
hm, any ideas ?
Regards, Gilbert
-----Original Message----- From: Dominique Devienne [mailto:ddevienne@(protected)] Sent: Tuesday, September 26, 2006 3:49 PM To: Ant Users List Subject: Re: Location attribute in property not resolving correctly
> ... > <pathconvert refid="mypath" property="myfixedpath" targetos="unix"/>
Create a text property, not a referenceable path.
> <timestampselector property="targetfile" pathref="${myfixedpath}" > count="1" age="eldest"/> > ...
Use your selector first, then convert the final path into a string before <echo>. --DD
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |