ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariano Benitez <mari...@fuegolabs.com>
Subject Re: how to set a property with a regexp
Date Fri, 09 May 2003 13:26:15 GMT
sorry, I worked it out.
the mapping is done before the path separator conversion, so what I have 
to do is set targetos="unix" and the manifest is ok

Mariano Benitez wrote:

> I have the following problem:
>
> I have a fileset that I want to convert to the manifest classpath. so 
> this is what I do:
>
> 1) pathconvert
>        <property name="lib.dir.sep" 
> value="${basedir}${file.separator}lib${file.separator}"/>
>        <pathconvert refid="project.class.path" 
> property="manifest.class.path" pathsep=" ">
>            <map from="${lib.dir.sep}" to=""/>
>        </pathconvert>
>        <echo message="${manifest.class.path}"/>
>
> 2) the problem comes when trying to make this work fine on both win 
> with cygnus and unix.
>    the paths in the fileset comes with the path separator of the 
> target os, so I change my map so that reflect that.
>    the problem is that if the fileset contains another subdirectory 
> like lib/tomcat/catalina.jar, the result of the mapping is different 
> on each platform,
>        in unix is "tomcat/catalina.jar" and in windows is 
> "tomcat\catalina.jar"
>
> 3) now, how can I set another property but replacing ${file.separator} 
> with /?
>
>
> any suggestions are appreciated!
>
> MAriano
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org



Mime
View raw message