You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefano Mancarella <ma...@opoipi.bancaintesa.it> on 2001/06/22 12:07:52 UTC

Available not working

I'm trying to use the "available" task, but parsing
fails with the following message:

Unexpected element "available".

I've noticed the no property was defined in
defaults.properties for this task so I added the
following line:

available=org.apache.tools.ant.taskdefs.Available

but still doesn't work.

I'm using Ant 1.3. Here's my example:

<project name="myProject" default="compile" basedir=".">
    ...
    <available property="log.present" file="${log.file}" />
    ...
</project>

Where am I wrong?


Re: Available not working

Posted by Rob van Oostrum <rv...@ezgov.com>.
you need to be in the context of a target to use available. So put all
your available stuff in a target and make sure that gets executed.

Stefano Mancarella wrote:

> I'm trying to use the "available" task, but parsing
> fails with the following message:
>
> Unexpected element "available".
>
> I've noticed the no property was defined in
> defaults.properties for this task so I added the
> following line:
>
> available=org.apache.tools.ant.taskdefs.Available
>
> but still doesn't work.
>
> I'm using Ant 1.3. Here's my example:
>
> <project name="myProject" default="compile" basedir=".">
>     ...
>     <available property="log.present" file="${log.file}" />
>     ...
> </project>
>
> Where am I wrong?