Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 11762 invoked from network); 20 Feb 2004 16:38:22 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Feb 2004 16:38:22 -0000 Received: (qmail 38871 invoked by uid 500); 20 Feb 2004 16:38:07 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 38835 invoked by uid 500); 20 Feb 2004 16:38:07 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 38813 invoked from network); 20 Feb 2004 16:38:06 -0000 Received: from unknown (HELO web40607.mail.yahoo.com) (66.218.78.144) by daedalus.apache.org with SMTP; 20 Feb 2004 16:38:06 -0000 Message-ID: <20040220163809.81466.qmail@web40607.mail.yahoo.com> Received: from [62.44.96.2] by web40607.mail.yahoo.com via HTTP; Fri, 20 Feb 2004 08:38:09 PST Date: Fri, 20 Feb 2004 08:38:09 -0800 (PST) From: Ivan Ivanov Subject: Re: Excluding path from another path To: Ant Users List In-Reply-To: <4036128E.5020402@antbuild.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1271634956-1077295089=:80583" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-1271634956-1077295089=:80583 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline Hi Antoine, I wrote the additional text to using.html and I am sending you diff file: diffusing.txt. Regards Ivan PS. Just for information: ant -version shows Apache Ant version 1.5.3 compiled on April 16 2003 PPS. I created the diff file in the following way: 1) cp using.html using_new.html 2) I added the text in using_new.html 3) diff using.html using_new.html > diffusing.txt Then I checked it with patch using.html diffusing.txt and it appeared to be all right. I hope I haven't made a mistake. --- Antoine_L�vy-Lambert wrote: > > Hi Ivan, > > yes, please do it, this is a good idea. :-) > > the best would be if you send a patch of the > using.html file to the list. > > Cheers, > > Antoine > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org > __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools --0-1271634956-1077295089=:80583 Content-Type: text/plain; name="diffusing.txt" Content-Description: diffusing.txt Content-Disposition: inline; filename="diffusing.txt" 525a526,612 > >

If you want to control your path-like structures better, you may use selectors. Selectors > provide more sophisticated way to build filesets than <include> and <exclude> > filesets attributes. Consider the following scenatrio: in your project's lib dir you > have jar files used for testing (like junit.jar), jar files used by the very project > (like JavaMail API mail.jar) and some jar files used by both (like jdbc drivers). > You may organize all jars in this way:

> >
> <selector id="common.lib">
>   <or>
>     <filename name="common1.jar"/>
>     <filename name="common2.jar"/>
>   </or>
> </selector>
> 
> <selector id="test.lib" description="Describes jars used for testing">
>   <or>
>     <filename name="test1.jar"/>
>     <filename name="test2.jar"/>
>     <filename name="test3.jar"/>
>     <filename name="test4.jar"/>
>   </or>
> </selector>
> 
> >

Here <or> means that when nested in a fileset these selectors will pick all > files, whose name is one of the name in <filename> attributes.

> >
> <selector id="project.lib" description="Describes jars used by the project">
>   <not>
>     <selector refid="test.lib"/>
>   </not>
> </selector>
> 
> >

Here <not> means that these selector will pick all files, except those that > are matched by "test.lib" selector. > > From these selector you can build paths, so that you use it later when compiling > or running your project or your proejcts tests in this way:

> >
> <path id="test.classpath">
>   <fileset dir="${project.lib}">
>     <or>
>       <selector refid="test.lib"/>
>       <selector refid="common.lib"/>
>     </or>
>   </fileset>
> </path>
> 
> >

Here this path will contain all files from project's lib directory that are picked by > one of "test.lib" or "common.lib" selectors.

> >
> <path id="project.classpath">
>   <fileset dir="${project.lib}">
>     <selector refid="project.lib"/>
>   </fileset>
> </path>
> 
> >

Later in you compile target and compile-test target you can use these path's in the usual way:

> >
> <target name="compile" depends="..." ...>
>   <javac ...>
>     <classpath refid="project.classpath"/>
>   </javac>
> </target>
> 
> <target name="compile-test" depends="..." ...>
>   <javac ...>
>     <classpath refid="test.classpath"/>
>   </javac>
> </target>
> 
> >

You can also easily exclude test jars from your project distributions simply by applying <not> > to "test.lib" selector in the fileset containing your jars for the distribution.

> >

See the page about Selectors to see all the criterea that > can be used in selectors.

> --0-1271634956-1077295089=:80583 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --0-1271634956-1077295089=:80583--