views:

122

answers:

2

It doesnt seem that when you combine these Fileset attribute like below: eg:

<fileset dir="src">
    <include name="gov/nasa/arc/mas/selenium/tests/*.java" />
    <excludesfile name="${test.suite}.exclude" />
</fileset>

that it has the expected behavior which is to include all *.java under src but exclude all the file specified on the excludefile.

Is it possible to combine include and excludesfile or do you need to user a corresponding includesfile??

Its a shame that these things are not documented and its hard to find explanations on google.

+1  A: 

Actually, I think the Ant Manual is pretty clear about these types of things.

What isn't clear to me is what it is that you want to do. Do you want to use external files for both your "includes" and your "excludes"? Or are you looking to have one override the other?

matt b
my excludesfile contains these lines:**/tests/CloneSingleMultipleRecords***/tests/AssigneeIsSameAsReporterTest*but when i run the tests, these tests are run also but it shouldnt
Afamee
Yeah, I visit http://ant.apache.org/manual/ so "frecently" that I just need to type "an" in my Firefox address bar and it's the first suggested completion :-)
David Citron
Check to make sure that your pattern actually matches the actual name/path of the files you want to exclude. Using both include and excludes as you want definitely worked - it's a feature used in almost every project that builds with Ant.
matt b
A: 

It is documented and should work: http://ant.apache.org/manual/CoreTypes/fileset.html

Note that in the excludesfile, "each line of this file is taken to be an exclude pattern." What does your excludesfile look like?

David Citron