ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: includes and excludes
Date Thu, 30 Aug 2001 16:44:36 GMT
I believe that excludes will always take precedence and thus chuck out your 
includes "matches". What you may be able to do is something like

<jar jarfile="jcp.jar" whenempty="skip" defaultexcludes="false">
    <fileset dir="${base.dir}">
      <exclude name="**/bar/*" />
    </fileset>
    <fileset dir="${base.dir}">
      <include name="**/foo/bar/*.class" />
    </fileset>
</jar>

Not sure - haven't checked it works but try that ;)

On Fri, 31 Aug 2001 01:09, Kyle Adams wrote:
> I'm still stuck on this problem - anyone have even a smidgen of an idea?
>
> >>> kadams@gfs.com 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/*" />
> </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

-- 
Cheers,

Pete

---------------------------------------------------
"Marriage, Friends, Religon -- these are the demons 
you must slay in order to suceed in business.." 
                 -- Mr. Burns, The Simpsons 
---------------------------------------------------

Mime
View raw message