ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Unexpected element "available"
Date Mon, 27 Nov 2000 16:54:19 GMT
Rasmus Rasmussen <rasmus.rasmussen@infonation.se> wrote:

> Hello there,
> 
> I'm using task "available" like this
> 
>   <available classname="org.whatever.Myclass"
>   property="Myclass.present" />
> 
> and get the error
> 
>   Unexpected element "available"
> 
> I verified that the classfile resides in ant.jar. Other tasks in
> ant.jar are obviously accessed successfully. What am i doing wrong?

Usually Ant would tell you it couldn't find the task definition if it
was a CLASSPATH problem. This looks more like a problem in the
document structure of your XML file, i.e. <available> is probably not
nested inside a <target> (or this one is not nested into a <project>).

The most common error I find in my own buildfiles is that I close tags
by accident, something like

<target name="foo" />
  <available ...>
</target>

could cause an error like the one you've reported (remove the slash in
the start tag of <target>).

Stefan

Mime
View raw message