ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <>
Subject How to create paths that depend on a condition?
Date Sat, 22 May 2004 08:40:45 GMT

I'd like to create a <path> that depends on some property being defined
or not. This is for putting inside the <javac> task. I cannot find the
right combination. Here's what I'd like to do:

    <javac [...]>
        <pathelement location="${src.test.dir}/share-12-13-14"/>
---> start here
        <dirset dir="${src.test.dir}/share-13-14">
            <depth max="0"/>
              <selector if="j2ee13.available"/>
              <selector if="j2ee14.available"/>
---> stop here

The problem is that in order to use a selector (which has a "if"
attribute), I need to use direst. However dirset lists all directories
below a base dir. Hence the reason why I've tried using a max <depth> of

When I run this I get a "duplicate class" error:

duplicate class: org.apache.cactus.TestAll
    [javac] public class TestAll
    [javac]        ^
xtension\jetty\T duplicate class:
    [javac] public class TestJettyTestSetup extends TestCase
    [javac]        ^
    [javac] 2 errors

I think it's because some directories are added several times. Not sure
why though.

Is there a simpler way to achieve this? (it sounds very complex)

I'm using Ant 1.6.1.


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

View raw message