ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakesh mailgroups <>
Subject directory paths
Date Fri, 04 Mar 2005 11:49:18 GMT

sometimes Ant gives you too many ways to do things and you cobble
something together that works but you think can probably done easier.
Here's what i am trying to do:

My web.xml needs to contain a full path to a config file. This path
should work whether on windows or unix. The location is always in a
subdirectory of the base dir. Here's my Ant code:

<path id="location.frontservletxmlfile">
	<pathelement location="${dir.web}" />
<pathconvert targetos="windows" property="win"
refid="location.frontservletxmlfile" />
   <echo>Path to xml file is: ${win}</echo>
   <copy file="${dir.conf}/web.xml.template" toFile="${dir.web}/web.xml">
	<filter token="xml.location" value="${win}" />

the xml file goes from:

It does work (on windows, haven't tested on Unix yet) but is their an
easier way???? It seems so long winded!



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message