ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Christiansen" <Nathan_Christian...@morinda.com>
Subject RE: How to use condition tasks
Date Thu, 12 Dec 2002 18:07:40 GMT
I get an error when trying:

BUILD FAILED
file:/java/catalog/new_build.xml:8: Could not create task or type of type: condidtion.


Ant could not find the task or a class this task relies upon.



My code:

<target description="Sets up properties dependent on environment." name="setProperties">
  <exec executable="uname" os="Linux" outputproperty="hostname">
    <arg line="-a"/>
  </exec>

  <condidtion property="in.dev.environment">
    <contains casesensitive="false" string="${hostname}" substring="dev"/>
  </condidtion>
  <condidtion property="in.test.environment">
    <contains casesensitive="false" string="${hostname}" substring="test"/>
  </condidtion>
</target>



The output from 'ant -diagnostics' is:

------- Ant diagnostics report -------
Apache Ant version 1.5 compiled on July 9 2002

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.5
optional tasks : 1.5

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.jar (716139 bytes)
optional.jar (653661 bytes)
xercesImpl.jar (933730 bytes)
xml-apis.jar (108484 bytes)
xalan.jar (897409 bytes)
cactus-ant-1.4.1.jar (18968 bytes)
junit.jar (117522 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
com/starbase/starteam/Item


-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Thursday, December 12, 2002 10:42 AM
To: 'Ant Users List'
Subject: RE: How to use condition tasks


<condition property="xxx">
  <isset property="property-name" />
  <istrue value="${property-name}" />
</condition>

The former just takes the property name (no de-referencing), the latter
requires de-referencing. --DD

-----Original Message-----
From: Nathan Christiansen [mailto:Nathan_Christiansen@morinda.com] 
Sent: Thursday, December 12, 2002 11:37 AM
To: Ant Users List
Subject: How to use condition tasks

I have tried looking through the User Manual and can't find the
documentation on how to use the condition tasks like <IsSet>.  I found them
in the javadoc API docs, but cant find where they are described with
examples.

Am I missing something?

-- Nathan Christiansen

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


--
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