ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Retrieving a list of directory names from fileset without the fully qualified path
Date Fri, 02 Apr 2004 14:27:44 GMT
FYI:  Using the CVS version of Ant, you can use a
nested flatten mapper with pathconvert to do all this.

-Matt

--- "Daniels, Doug" <Doug.Daniels@GDC4S.Com> wrote:
> It would be very easy to replace a semicolon
> seperated paths with a newline
> and do the regex work on it to convert it to a
> newline delimited set of
> arguments.
> 
> Basically you take the DirSet, or FileSet you want
> to convert, in my example
> I call it yourDirSet, then you do a <pathconvert> to
> convert those
> pathelements to a property, and during that convert
> you replace the pathsep
> ";" with the xml entity for newline "
". Then
> you run the
> <propertyregex..> passing in the newly converted
> path property at
> ${propDirSet}.
> 
> Here is the snippet:
> 
> <pathconvert pathsep="
" refid="yourDirSet"
> property="propDirSet"/>
> 
> <propertyregex property="arg" global="true"
> override="true"
>        input="${propDirSet}"
>        regexp="[a-zA-Z]:\\([^\\\s]+\\)+"
>        replace=""
>        defaultValue="failed" />
> 
> 
> Hope that works for you.
> 
> ~ Doug Daniels
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


Mime
View raw message