ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Dougherty <MDoughe...@XIFIN.Com>
Subject RE: includes and excludes
Date Tue, 22 Oct 2002 20:10:53 GMT
> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@lgc.com]
> Sent: Tuesday, October 22, 2002 12:13 PM
> To: 'Ant Users List'
> Subject: RE: includes and excludes
> 
> 
> Yes. The file candidate set is first reduced by the include 
> patterns (the
> file name must match one of the include pattern if any), and 
> then by the
> exclude patterns, which removes all files matching them from 
> the candidate
> set. Using two filesets should work for you I think... Try:
> 
> <copy todir="${deploy.server.classes.dir}"
>       overwrite="${force}">
>   <fileset dir="${build.dir}">
>     <include name="**/*.class" />
>     <exclude name="**/ejb/**" />
>   </fileset>
>   <fileset dir="${build.dir}">
>     <include name="**/ejb/**/PyrLcDiagCd.class" />
>   </fileset>
> </copy>
> 
> --DD
> 
> -----Original Message-----
> From: Terry Steichen [mailto:terry@net-frame.com] 
> Sent: Tuesday, October 22, 2002 2:00 PM
> To: Ant Users List
> Subject: Re: includes and excludes
> 
> I believe exclude takes precedence.
> 
> Terry
> 
> ----- Original Message -----
> From: "Mike Dougherty" <MDougherty@XIFIN.Com>
> To: "Ant Users (E-mail)" <ant-user@jakarta.apache.org>
> Sent: Tuesday, October 22, 2002 2:33 PM
> Subject: includes and excludes
> 
> 
> > I need a little help understanding how <fileset>'s 
> <include> and <exclude>
> elements work. I have the following:
> >
> >     <copy todir="${deploy.server.classes.dir}" overwrite="${force}">
> >       <fileset dir="${build.dir}">
> >         <include name="**/*.class" />
> >         <include name="**/ejb/**/PyrLcDiagCd.class" />
> >         <exclude name="**/ejb/**/*.class" />
> >       </fileset>
> >     </copy>
> >
> > Which I expect to exclude all the classes under **/ejb 
> except the class I
> have explicitly included. However, this does not appear to be 
> happening. The
> PyrLcDiagCd.class does not get copied to the destination 
> directory. Why is
> that?
> >
> > /mike
> >
> >
> > Mike Dougherty
> > Sr. Software Engineer   | mdougherty@xifin.com
> > XIFIN, Inc.             | http://www.xifin.com 
<http://www.xifin.com/>
> Ph: 760.804.0770 x47    | Fax: 760.804.0851
>
> This message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender and destroy all copies of the original
message.
>
>
>


Thanks Dominique, that did what I needed. I appreciate the advice.

/mike

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message