ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daffin, Miles \(IT\)" <Miles.Daf...@morganstanley.com>
Subject RE: Convert property that is a path to a resource
Date Tue, 09 Jan 2007 18:13:28 GMT
Thanks for the help. Do you have any suggestions about how I could use
pathconvert in the following context without bloating out my build file?


<copy file="${template.file}"
      tofile="${destination.file}"
      overwrite="true">
  <filterset>
    <filter token="PATH_1" value="${path.1}"/>
    <filter token="PATH_2" value="${path.2}"/>
    <filter token="PATH_3" value="${path.3}"/>
  </filterset>
</copy>

> -----Original Message-----
> From: Steve Loughran [mailto:stevel@apache.org] 
> Sent: Tuesday 09 January 2007 16:39
> To: Ant Users List
> Subject: Re: Convert property that is a path to a resource
> 
> Daffin, Miles (IT) wrote:
> > Hi All,
> >  
> > I have a build with a number of properties that are paths to 
> > directories. I write these into a template script file using a 
> > filterset during a copy. The problem is that the properties 
> have mixed 
> > windows and unix path separators, so when they are written into the 
> > scripts they are invalid. This does not matter when the 
> properties are 
> > used in operations by ant (e.g. mkdir or copy) because ant/java 
> > normalises the property for the platform (i.e. changes all 
> separators 
> > to '/' on unix or '\' on windows). Is there a way of making 
> sure that 
> > the same thing happens when I use these properties to 
> replace tokens 
> > in the filterset? Can I convert them somehow?
> >  
> 
> <pathconvert> does all this fixup
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
>
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

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


Mime
View raw message