Java Mailing List Archive

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

Home » Ant Users List »

Re: Filter on copy with directory contents

Paul J. Lucas

2008-02-20

Replies: Find Java Web Hosting

Author LoginPost Reply
On Feb 20, 2008, at 4:48 PM, Martin Gainty wrote:

> Here is the source for input.java

Uhm... look: I suppose I appreciate that some effort is being
undertaken, but:

1. The source-code you pasted is unreadable as-is.

2. Again, I'm looking for an all-ant solution. If ant isn't powerful
enough to do what I want, then that's a reasonable answer.

3. Your solution still doesn't solve my problem.

a) The string "REPLACEME" shouldn't be hard-coded; the string to
replace should be specified in the ant build.xml file. (I would have
thought using a string like "REPLACEME" would have obviously appeared
pedagogical.)

b) It doesn't limit the directory names matched to a specific glob
pattern.

c) It doesn't wrap each directory name with <string></string>. (The
transformation should also be specified in the build.xml and not hard-
coded.)

The solution, if one exists, would use <copy>, <filter>, <fileset>,
and somehow getting the contents of a directory into a string, say a
property. Once in a string, a regex replacement can be done on it.

- 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.