ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <>
Subject Re: includes and excludes
Date Thu, 30 Aug 2001 16:30:42 GMT
Here you go:
This works for me, so if it doesn't for you.... OMG!
Generally from all examples I've seen, you keep your excludes AFTER your
includes.  Stick to that order for readabiity and maintenance.

I've not done anything with an excludes and includes such as yours.

<target name="jarProject" depends="init, compileProject">
-     <jar jarfile="${dist.dir}/${}.jar"
-         <metainf dir="${src.dir}/${project.path.ejb}">
              <include name="ejb-jar.xml" />
              <include name="weblogic-ejb-jar.xml" />

----- Original Message -----
From: "Kyle Adams" <>
To: <>
Sent: Thursday, August 30, 2001 9:09 AM
Subject: Re: includes and excludes

I'm still stuck on this problem - anyone have even a smidgen of an idea?

>>> 08/27/01 10:38AM >>>
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/*" />

<!-- Java classpath jar -->
<jar jarfile="jcp.jar" basedir="${base.dir}" whenempty="skip"
    <exclude name="**/bar/*" />
    <include name="**/foo/bar/*.class" />

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 :-)


View raw message