You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kyle Adams <ka...@gfs.com> on 2001/08/27 16:38:38 UTC
includes and excludes
I'm looking for clarification on exactly how includes and excludes work.
I need to package two JARs for weblogic - one for the java classpath,
one for the weblogic classpath. The directory bar should be excluded
from one, and included in the other, EXCEPT when bar is a subdirectory
of foo. I had thought this would handle it:
<!-- Weblogic classpath jar -->
<jar jarfile="wcp.jar" basedir="${base.dir}" whenempty="skip">
<include name="**/bar/*.class" />
<exclude name="**/foo/bar/*" />
</jar>
<!-- Java classpath jar -->
<jar jarfile="jcp.jar" basedir="${base.dir}" whenempty="skip"
defaultexcludes="false">
<exclude name="**/bar/*" />
<include name="**/foo/bar/*.class" />
</jar>
But the jcp.jar is skipped, which leads me to believe that the last <include> does not override the <exclude>. Or that my syntax is just incorrect :-)
Kyle