Exclude files for build-artifacts

Vince November 28, 2013

I'm trying to keep the file

target/project-[version_number].jar

while not keeping

target/project-[version_number]-javadoc.jar
target/project-[version_number]-sources.jar

With the Ant file copy patterns there are only * and ? available, which isn't enough for this since

target/project-*.jar

will also get the other files and

target/project-?.jar

will fail when the version number hits numbers > 9.

Is there any way, I can achieve this?

1 answer

0 votes
Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2013

Check this page out: http://ant.apache.org/manual/Types/patternset.html

It references this example:

<patternset id="non.test.sources">
  <include name="**/*.java"/>
  <exclude name="**/*Test*"/>
</patternset>

Which you should be able to put in your ant build file.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events