4
votes

Is there a way to have an Ant Fileset->IncludesFile attribute take a property file OR any other file that contains a list of Java class files to exclude?

Eg:

File A.properties OR A.java contains listing

abc.class 
mno.class 
xyz.class 

Is there a way to say to point excludesFile to file A.properties.

<fileset dir="...">
    <excludesFile file="A.properties" />
</fileset>

The behavior that I want is when Java runs, it excludes the Java files listed in this file (A.properties)

1
you might actually add the code snippet, so we know better how to helptgray
@tgray: The code snippet was there, but it wasn't formatted as code so it was stripped from the post.Michael Myers

1 Answers

4
votes

Hmm...not sure if it's case sensitive. The documentation at http://ant.apache.org/manual/Types/fileset.html shows "excludesfile", all lowercase, as with other ant directives.

I'm not sure exactly what you are asking. If you have a fileset which is including files you would like to exclude, and you want to specify that list of files to exclude in an external file, "excludesfile" is the correct way to do it.