ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: <antlib> attributes - WAS: [VOTE] Release Apache .NET Antlib 1.0 final
Date Tue, 31 Oct 2006 13:00:45 GMT
On 10/31/06, Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de> wrote:
> >1)
> >the antlib.xml does not set the onerror attribute, this means
> >that all the definitions will be loaded when one is loaded,
> >using onerror="ignore" should be used.
> >("ignore" is a bit of a misnomer - it should be "deferred", i.e.
> >the check will be made when the task is first used).
>
> Where is this documented?
Good point!
It is not documented.

<taskdef name="mytask" classname="this.does.not.exist"
              onerror="ignore"

will be accepted ok.
However when used,
<mytask/>
one gets the message:
C:\Documents and Settings\reilly\learning\a\typedef\build.xml:6:
Problem: failed to create task or type mytask
Cause: the class this.does.not.exist was not found.
Action: Check that the component has been correctly declared
.....

The idea of using the value "ignore" in an antlib is to
defer creating the types/tasks until they are used by the
build script - this emulates the built-in tasks/types of
ant and allows thirdparty antlibs to have "optional" types/tasks


Peter

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

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


Mime
View raw message