ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Sadangi <msada...@manh.com>
Subject RE: using wildcards in <map> attributes?
Date Tue, 13 May 2003 18:39:47 GMT
did you look for reg expression?

thanks, 
manoj



-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com]
Sent: Tuesday, May 13, 2003 2:13 PM
To: user@ant.apache.org
Subject: Fwd: using wildcards in <map> attributes?



I sent this last night and I think it might have gotten lost in the shuffle 
of all the posts this morning.  Does anyone know whether what I am asking 
below is possible?

Jake

>Posted-Date: Tue, 13 May 2003 00:38:40 -0500 (CDT)
>Date: Tue, 13 May 2003 00:40:22 -0500
>To: user@ant.apache.org
>From: Jacob Kjome <hoju@visi.com>
>Subject: using wildcards in <map> attributes?
>
>
>My guess is that this is probably not possible, but I'll throw it out 
>there anyway.  I would like to use <pathconvert> to create a property 
>containing a path with unix directory separators whether on the Unix or 
>Windows.  That's easy.  However, I would also like it, on Windows, to be 
>able to fully remove the prefixed drive letter + colon combo.  I don't 
>care what drive it is, I just want it gone from the resulting path.  I 
>tried this...
>
><pathconvert targetos="unix" property="src.core.home.unix">
>     <path>
>         <pathelement location="${src.core.home}"/>
>     </path>
>     <map from="*:" to=""/>
></pathconvert>
>
>However, the wildcard symbol (*) is treated literally rather than being 
>treated as a wildcard.  So, I have to resort to something like this....
>
><pathconvert targetos="unix" property="src.core.home.unix">
>     <path>
>         <pathelement location="${src.core.home}"/>
>     </path>
>     <map from="c:" to=""/>
>     <map from="d:" to=""/>
>     <map from="e:" to=""/>
>     <map from="f:" to=""/>
>     <map from="g:" to=""/>
></pathconvert>
>
>However, that is both verbose and error prone.  What if the user is on the 
>"h:" drive?  Can't I somehow use a wildcard to match against all drive
letters?
>
>Just hoping!
>
>Jake
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

Mime
View raw message