ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Rasmussen <rasmus.rasmus...@infonation.se>
Subject RE: Unexpected element "available"
Date Tue, 28 Nov 2000 09:48:33 GMT
Thanks! I'll put those <available> tasks in the <init> task then...

Q: shouldn't it be possible to have <available> nested inside a <project>
also? I don't see the purpose...


-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Monday, November 27, 2000 5:54 PM
To: ant-user@jakarta.apache.org
Subject: Re: Unexpected element "available"


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