Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Developers List »

Re: Adding magic properties for targets?

Stefan Bodewig

2008-06-02

Replies: Find Java Web Hosting

Author LoginPost Reply
On Fri, 30 May 2008, Dominique Devienne <ddevienne@(protected):

> I'd add that those properties, if made available, should probably be
> prefixed with ant., to make it clear they are "built-in". Perhaps:
>
> ant.default-target
> ant.targets-invoked

The actual patch uses ant.current.target and ant.project.target, so we
should be fine WRT namespacing. We might talk about the names, but
right now I'd like to see whether the feature is desired at all (looks
good so far).

> Since we're at it, we may also want to expose ant.current-target and
> ant.invoked-target properties, but these are "dynamic" since
> changing during the course of the build, so more problematic given
> the property immutability rules.

Just to make sure I understand what you are talking about. Those
would refer to the currently excuting target and a list of targets
that have already been executed, right? I don't see much harm here
either.

> Exposing them via a PropertyHelper to made it clear they are dynamic
> perhaps? ${dynamic:ant.current-target}...

Works for me.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@(protected)
For additional commands, e-mail: dev-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.