ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <>
Subject Re: Excluding path from another path
Date Fri, 20 Feb 2004 00:11:16 GMT
Ivan Ivanov wrote:

>Dear colleagues,
>I have been using ant for 3 years and the fact that
>this is my first post in the mailing is the proof of
>ant documentation qualities and ant itself.
>My question is the following. I am currently
>experimenting with Cactus testing framework. Cactus
>requires several jars to reside in my classpath. I am
>trying to divide my jars in two groups: the ones
>required for testing and ones required by out projects
>and I defined two paths:
Hi Ivan,

you need to define selectors with id and refer to them with refid.

NB ant's own build file is a good source of inspiration.

I also saw that on the manual page talking about references, there is no 
mention of selectors (or I misread).

Now for you :

Something like

<selector id="mytestjars">
       <filename name="test1.jar"/>
       <filename name="test2.jar"/>
       <filename name="test3.jar"/>
       <filename name="test4.jar"/>

<selector id="myprodjars">
       <filename name="prod1.jar"/>
       <filename name="prod2.jar"/>
       <filename name="prod3.jar"/>
       <filename name="prod4.jar"/>

<fileset id="f1" dir="lib">
    <selector refid="mytestjars"/>
    <selector refid="myprodjars"/>

<fileset id="f2" dir="lib">
    <selector refid="myprodjars"/>

<fileset id="f2" dir="lib">
        <not><selector refid="mytestjars"/></not>
        <selector refid="alljars"/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message