ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: problem with build file or is there a better way?
Date Fri, 13 Dec 2002 17:36:13 GMT
<condition> is a task, and thus cannot appear at the top level. It must be
inside a target that your other target depend on (usually an 'init' target).

Ant 1.6 will support top-level tasks. --DD

-----Original Message-----
From: Tony Dahbura [mailto:tony@loudcloud.com] 
Sent: Friday, December 13, 2002 11:34 AM
To: ant-user@jakarta.apache.org
Subject: problem with build file or is there a better way?

I need to have the classpath for a ant javac to be different based on
the jdk being used.

I tried the following at the top of my build.xml file:
<condition property="jsselibs">
<value="${basedir}/lib/jaas.jar:${basedir}/lib/jnet.jar:${basedir}/lib/jsse.
jar"/>

    <and>
      <ant.java.version="1.3" />
    </and>
</condition>

and followed it with another condition for 1.4

<condition property="jsselibs">
<value="${basedir}/lib/stub.jar"/>
    <and>
      <ant.java.version="1.4" />
    </and>
</condition>


I get the following message everytime I try a build with this:
file:/home/tony/devt/build.xml:29: Unexpected element "condition"

The documentation for condition shows this as a valid syntax for this.
Am I doing this right or should I try a different approach?
I have the condition clauses at the top of my build file before my
target definitions.

Thanks,
Tony


--
Tony Dahbura


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


Mime
View raw message