ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RADEMAKERS Tanguy" <>
Subject RE: Error - Could not create task of type: condition
Date Wed, 15 Nov 2006 15:12:32 GMT
Hello Sergio,

"Condition" is a built-in task (no need to add any jars anywhere), but you are running a really
old version of ant, so that's probably the issue here. First things first: upgrade ant to
1.6.5 (latest stable). There is no built-in way to upgrade ant, so just go to,
and follow the instructions to download and install 1.6.5 on your computer . After installing,
make sure that you are using the new version by typing:

C:\Documents and Settings\trademak>ant -version
Apache Ant version 1.6.5 compiled on June 2 2005


>-----Original Message-----
>From: Sérgio Oliveira [] 
>Sent: Wednesday, November 15, 2006 11:23 AM
>Subject: Error - Could not create task of type: condition
>I´m new to java and ant (I´m a .net developer...). While 
>trying to compile 
>my application I get an error. I tried to put the optional.jar in the 
>directory mentioned but the error continues.
>Do I need to update ANT? If yes, how? I tried to copy a new 
>ant.jar file to 
>the directory but then gets another error...
>Version of ant:
>Ant version 1.3 compiled on March 2 2001
>The error I get:
>C:\App\Ant\bin\build.xml:107: Could not create task of type: 
>Common solutions are to use taskdef to declare your task, or, 
>if this is an 
>optional task, to put the optional.jar in the lib directory of 
>your ant 
>installation (ANT_HOME).
>XML code:
><target name="set-wscompile" >
>     <condition property="wscompile" 
>        <os family="windows"/>
>     </condition>
>     <condition property="wscompile" 
>        <not>
>           <os family="windows"/>
>        </not>
>     </condition>
>  </target>
>Thank you.
>Express yourself instantly with MSN Messenger! Download today 
>it's FREE! 
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message