Problem with Ant and <jar>

C

cbongior

This must be something simple, but then again I have also read that
certain basic ant commands do not fully support nested file sets

I am trying to create a jar file and exclude one particular directory
(and any subsequent sub directories)

The Syntax I am using (and I have tried variations on both) are

<jar destfile="${dist}/lib/mac.jar" basedir="${build}"
includes="/**"
excludes="com/trireme/watcher/**"/>

<jar destfile="${dist}/lib/mac.jar" basedir="${build}"
<fileset dir="${build}"
includes="/**"
excludes="com/trireme/watcher/**"/>
</jar>

In the first case, I get NOTHING! Just a jar with a manifest file. In
the second case, I get everything including that which I want to
exclude. Can someone with a little more Ant experience give me a hand?
Thanks
Christian Bongiorno
http://www.bongiorno.org/resume.PDF
 
C

cbongior

Ok, I have solved it. Turns out that Jar creates an implicit <FileSet>
with basedir= and I need to exclude from it in a seperate <fileSet>
tag
<fileset dir="${build}"
excludes="com/trireme/watcher/**"/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top