ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
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).
http://ant.apache.org/manual/using.html#references

Now for you :

Something like

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


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

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

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


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




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message