You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kevin LaVergne <kl...@comcast.net> on 2003/12/29 19:37:04 UTC

Unexpected Attribute Error in Ant 1.6.0

Howdy,

I just upgraded to 1.6.0 and was trying to use a namespace to declare 
custom tasks in. I know that in the 1.6 beta versions, you had to declare a 
namespace (just like with any other XML file) in order to use the task name 
format of prefix:taskname. I have the following in my buildfile:

<project name="Argo" default="help" basedir="."
     xmlns:parago="http://www.parago.com/ant/tasks">
.....
</project>

I get the following error when trying to run this: Unexpected attribute 
"xmlns:parago"

Does anyone know why I might be getting this error? Thanks.

Kevin


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Unexpected Attribute Error in Ant 1.6.0

Posted by Jacob Kjome <ho...@visi.com>.
What does your taskdef or typedef look like?  You will need something like 
this...

<typedef resource="com/parago/ant/tasks/tasks.properties"
            uri="http://www.parago.com/ant/tasks">

If you had an antlib.xml file available, then you could skip the taskdef and 
typedef (assuming your library exists in ANT_HOME/lib or user.home/.ant/lib) 
and simply add this to your project....

<project xmlns:parago="antlib:com.parago.ant.tasks" ...>

This assumes that antlib.xml is in the com/parago/ant/tasks package.

See the ant-contrib project for an example using antlib.xml.

Jake

Quoting Kevin LaVergne <kl...@comcast.net>:

> Howdy,
> 
> I just upgraded to 1.6.0 and was trying to use a namespace to declare
> custom tasks in. I know that in the 1.6 beta versions, you had to declare a
> namespace (just like with any other XML file) in order to use the task name
> format of prefix:taskname. I have the following in my buildfile:
> 
> <project name="Argo" default="help" basedir="."
>      xmlns:parago="http://www.parago.com/ant/tasks">
> .....
> </project>
> 
> I get the following error when trying to run this: Unexpected attribute
> "xmlns:parago"
> 
> Does anyone know why I might be getting this error? Thanks.
> 
> Kevin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Unexpected Attribute Error in Ant 1.6.0

Posted by Kevin LaVergne <kl...@comcast.net>.
Sorry about this message. My ANT_HOME variable was pointing to the location 
of my 1.5.4 installation.

Thanks.

Kevin

At 12:37 PM 12/29/2003, Kevin LaVergne wrote:
>Howdy,
>
>I just upgraded to 1.6.0 and was trying to use a namespace to declare 
>custom tasks in. I know that in the 1.6 beta versions, you had to declare 
>a namespace (just like with any other XML file) in order to use the task 
>name format of prefix:taskname. I have the following in my buildfile:
>
><project name="Argo" default="help" basedir="."
>     xmlns:parago="http://www.parago.com/ant/tasks">
>.....
></project>
>
>I get the following error when trying to run this: Unexpected attribute 
>"xmlns:parago"
>
>Does anyone know why I might be getting this error? Thanks.
>
>Kevin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org