ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Schapitz <Thomas.Schap...@ePost.de>
Subject Re: deleting specific files
Date Sat, 07 Feb 2004 22:28:44 GMT
Casey Crabb wrote:

>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
>
>
>  
>
While I'm too using the approach Donald has suggested, there is still an 
other
option. Junit best practices recommend suffixing all your test class 
names with 'Test'.
So you might employ filters like **/*Test.class and **/*Test$$*.class to 
catch your
test classes (the second one is meant to get inner classes, the 
duplication of  the
$$ should escape it.)

Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message