Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Filter on copy with directory contents -- solution

Paul J. Lucas

2008-02-21

Replies: Find Java Web Hosting

Author LoginPost Reply
After a friend pointed me to <pathconvert>, I managed to figure out a
pure Ant solution:

 <pathconvert pathsep="&#0010;" property="Info.plist:ClassPath">
  <fileset dir="somedir" includes="*.jar"/>
  <mapper>
    <chainedmapper>
     <flattenmapper/>
     <regexpmapper from="(.*)" to="&lt;string&gt;\1&lt;/
string&gt;"/>
    </chainedmapper>
  </mapper>
 </pathconvert>

 <copy file="..." todir="...">
  <filterset>
     <filter token="CLASSPATH" value="${Info.plist:ClassPath}"/>
  </filterset>
 </copy>

This assumes the file contains @CLASSPATH@(protected).

- Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.