Ant: Find one thing, copy another

Discussion in 'Java' started by Duane Morin, Jul 8, 2003.

  1. Duane Morin

    Duane Morin Guest

    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
     
    Duane Morin, Jul 8, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    30,314
    Diplomat
    Jan 12, 2011
  2. Alex
    Replies:
    2
    Views:
    1,237
  3. Replies:
    26
    Views:
    2,121
    Roland Pibinger
    Sep 1, 2006
  4. Robert Cohen
    Replies:
    3
    Views:
    279
    Andrew Durstewitz
    Jul 15, 2003
  5. Zam
    Replies:
    1
    Views:
    242
    Mark Schupp
    Mar 14, 2005
Loading...

Share This Page