You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by S�rgio Oliveira <ne...@hotmail.com> on 2006/11/13 19:49:40 UTC
Could not create task of type: condition.
Hello,
While compiling using ant, i get the following error:
Could not create task of type: condition. 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).
I cant run diagnostics on ant because it seems that option doesn´t exists in
this version..., bu running "ant -version" I get this:
Ant version 1.3 compiled on March 2 2001
The xml is this:
<target name="set-wscompile" >
<condition property="wscompile" value="${wscompile.dir}/wscompile.bat">
<os family="windows"/>
</condition>
<condition property="wscompile" value="${wscompile.dir}/wscompile">
<not>
<os family="windows"/>
</not>
</condition>
</target>
What is the problem? the version of ant? If yes, how can I update it....
please explain this knowing I´m a .NET developer and not a java developer...
argh :)
Thank you,
Sérgio
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Could not create task of type: condition.
Posted by Steve Loughran <st...@apache.org>.
wrote:
> Hello,
>
> While compiling using ant, i get the following error:
>
> Could not create task of type: condition. 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).
>
> I cant run diagnostics on ant because it seems that option doesn´t
> exists in this version..., bu running "ant -version" I get this:
>
> Ant version 1.3 compiled on March 2 2001
>
> The xml is this:
>
> What is the problem? the version of ant? If yes, how can I update it....
> please explain this knowing I´m a .NET developer and not a java
> developer... argh :)
wow, that is one old version of Ant. You should switch to Ant1.6.5, at
the very keast,
There's various ways to get a new version
1. Get a copy bundled into your IDE: eclipse, netbeans and idea all come
with one.
2. get a copy bundled with websphere, weblogic or whatever. I think this
is what you have. They are the ones that are usually most messed up.
3. If you have linux distro, use your package manager and get a copy
from a repository
4. By hand: go to ant.apache.org, download the Zip file and expand it
somewhere. Set the ANT_HOME env variable to the directory, and add
%ANT_HOME%/bin to your path, preferably after finding the old version
and renaming or removing it.
After upgrading, check with ant -version to make sure the new version is
being picked upl
-steve
>
> <target name="set-wscompile" >
> <condition property="wscompile"
value="${wscompile.dir}/wscompile.bat">
> <os family="windows"/>
> </condition>
> <condition property="wscompile" value="${wscompile.dir}/wscompile">
> <not>
> <os family="windows"/>
> </not>
> </condition>
> </target>
BTW, when you run batch files you dont really want to <exec> the batch
file. You want to the NT shell, what is it, cmd.exe, with the batch file
as a parameter
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org