user3795760
user3795760

Reputation: 11

Why excludesfile is not working?

I have a list of class files to be excluded and i have added them in a file (say) exclude_class.txt as :

**/a/b/c/*.class
**/d/e/f/*.class
**/g/h/i/j/*.class
**/k/l/*.class

Now when I use excludesfile in fileset task it is not working:

<fileset dir=".">
    <include name="A/**/*.class"/>
    <include name="B/**/*.class:/>
    <excludesfile name="exclude_class.txt"/>
</fileset>

Please let me know what is the issue here. What should be the syntax of file to use in excludesfile task.

Upvotes: 1

Views: 929

Answers (1)

sunbabaphu
sunbabaphu

Reputation: 1493

excludesfile (and also excludes, includes, includesfile) is an attribute of <fileset> and not a nested tag. you may use it like this:

<fileset dir="." excludesfile="exclude_class.txt">
    <include name="A/**/*.class"/>
    <include name="B/**/*.class:/>
</fileset>  

on the other hand, <include>, <exclude> are nested tags and may be used in the manner in which you've written.

as for the syntax within exclude_class.txt.. just make sure that there are no leading / trailing spaces in each line.

Upvotes: 2

Related Questions