Ant: Find one thing, copy another

D

Duane Morin

I'm trying to write an Ant task that searches for Java files
containing the string X, and then copies the associated class files to
a new directory. I'm using the <contains> selector to locate the
*.java files, but then the question is how to I say "Give me the class
file associated wth this java file?" I tried using a <mapper
from="*.java" to="*.class"/> which appeared to work at first until I
realized that it was taking the java file and simply renaming it.

Duane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top