| Location attribute in property not resolving correctly | Location attribute in property not resolving correctly 2006-09-27 - By Rebhan, Gilbert
Hi,
strange <project name="bla" default="main" basedir="."> <!-- Import AntContrib --> <taskdef resource="net/sf/antcontrib/antlib.xml" /> <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/foobar1.properties">filepath=${myfixedpath}</echo> <echo file="Y:/bla/foobar2.properties">filepath=${myfixedpath}</echo>
</target>
<target name="main" depends="depends"> <propertyfile file="Y:/bla/foobar1.properties" /> <echo>Targetfile === ${filepath}</echo> </target> </project>
foobar1.properties, the file which is loaded in the main target looks like #Wed Sep 27 07:53:37 CEST 2006 filepath=Y\:/bla/corba.jar
foobar2.properties looks like filepath=Y:/bla/aktecorba.jar
so it seems like the timestamp gets added when loading the propertyfile with <loadfile> but what is really fishy is that the path goes bad
from : Y:/bla/aktecorba.jar to: Y\:/bla/corba.jar
What's responsible for that ? and how to make the example above working ?
Regards, Gilbert
> <echo file="Y:/bla/foobar.properties">filepath=${myfixedpath}</echo> > The foobar.properties looks like > #Tue Sep 26 17:40:31 CEST 2006 > filepath=Y\:/bla/corba.jar
This is fishy because <echo> would never add the timestamp, like java.util.Property#store would. So something else created the file you're showing...
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |