ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holliday, Donald B. (LNG-CSP)" <Donald.Holli...@lexisnexis.com>
Subject RE: deleting specific files
Date Fri, 06 Feb 2004 23:44:44 GMT
The usual approach is to not compile both your implementation and tests to
the same place.  Instead compile your implementation to

	${base.dir}/build/classes/com/....

and your test to

	${base.dir}/build/test/com/....

This makes it easy to write a "clean" target for implementation, test, or
both.  It also makes it easy to write a <jar> task to jar up only your
implementation files.

If you just have to compile both test and implementation into the same
location I suppose you could always write a perl script to read the
test.java files and then delete the associated .class files (ugh).

Thanks,

Donald Holliday



-----Original Message-----
From: Casey Crabb [mailto:crabbkw@nafai.dyndns.org]
Sent: Friday, February 06, 2004 4:29 PM
To: user@ant.apache.org
Subject: deleting specific files


I have two parallel source branches, one for unittests and one for
implementation. Both of these branches compile into a single
codebase. For example:

test/com/foo/myprogram[/subpackage1,subpackage2,...]
src/com/foo/myprogram[/subpackage1,subpackage2,...]

Both of these compile into
codebase/com/foo/myprogram/[/subpackage1,subpackage2,...]

I'd like to write an ant script that will remove only the files that
were built from the test base, leaving the files that resulted from
compiling the src base. I'd like to do this without having to
individually specify files, as I could easily have more than a hundred
files under the test base.

Is there an Ant task which will scrape the source path for files
names, then delete their counterparts in the destination path?


--
Casey


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