You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@apache.org> on 2004/10/08 17:29:21 UTC

dynamic declarations of conditions

So now we have (assuming gump works) a new condition in Ant <IsPingable> 
that is only there when Java1.5 is present. Which means that we cannot 
hard code it into the condition task, but instead rely on dynamic typing 
and loading.

Which is fine, except that we still need to declare the new condition on 
startup, and we only typedef and taskdef the defaults.properties in 
/types and /tasks, dont we?

So what do we do for everything else

(a) have a new antlib we load on startup with extra bits. NB: does this 
fail if stuff is missing? I'd like to mark the condition as an optional 
load.

(b) completely migrate over to antlib for all our declarations.

(c) something else.

Thoughts?

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


Re: dynamic declarations of conditions

Posted by Peter Reilly <pe...@apache.org>.
Steve Loughran wrote:

>
> So now we have (assuming gump works) a new condition in Ant 
> <IsPingable> that is only there when Java1.5 is present. Which means 
> that we cannot hard code it into the condition task, but instead rely 
> on dynamic typing and loading.
>
> Which is fine, except that we still need to declare the new condition 
> on startup, and we only typedef and taskdef the defaults.properties in 
> /types and /tasks, dont we?

The defaults.properties in /types is the place to put the new condition.

It already contains some optional types -
scriptfilter and classfileset for example.

>
> So what do we do for everything else
>
> (a) have a new antlib we load on startup with extra bits. NB: does 
> this fail if stuff is missing? I'd like to mark the condition as an 
> optional load.

In an antlib, one marks an optional type/task by using the 
onerror="ignore" attribute.

>
> (b) completely migrate over to antlib for all our declarations.

I was a bit worried about doing this as it would effect startup time.

Peter

>
> (c) something else.
>
> Thoughts?
>
> ---------------------------------------------------------------------
> 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