Jacob Nelson
Jacob Nelson

Reputation: 3016

ANT creating a WAR file and excluding a word

When building my WAR file I want to exclude all files that have the word "test" in them. Is there a way to exclude all those files in one exclude tag?

Upvotes: 1

Views: 1743

Answers (2)

Stijn Geukens
Stijn Geukens

Reputation: 15628

yes

<war ... excludes="**/**test**" />

or by using a fileset

Upvotes: 0

skaffman
skaffman

Reputation: 403611

Yes, using something like this in a <fileset>:

<exclude name="**/*test*"/>

In fact, this is the first example in the Ant manual for <FileSet>.

Upvotes: 2

Related Questions