ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniels, Doug" <Doug.Dani...@GDC4S.Com>
Subject RE: Retrieving a list of directory names from fileset without the fully qualified path
Date Fri, 02 Apr 2004 15:02:46 GMT
Ahh yes, I knew all this regex work would be a puzzle other people must've
struggled with. Now that you mention the <map > task I should've looked
there first. When will this <mapper type="flatten"> element of the
pathconvert feature be released officially? Because my company tends to shy
away from beta releases, for now I'll stick with my regex and clean it up
once that feature becomes official.

Thanks for the tip.

~ Doug Daniels


-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com]
Sent: Friday, April 02, 2004 9:28 AM
To: Ant Users List
Subject: RE: Retrieving a list of directory names from fileset without
the fully qualified path


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

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


Mime
View raw message