ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject Re: pluggable ProjectHelper
Date Thu, 21 Feb 2002 21:43:45 GMT
From: <>

> On Thu, 21 Feb 2002, Peter Donald wrote:
> > Hi,
> > 
> > Would you mind making all those icky protected variables private :)
> No problem, I'll do that. 
> If nobody is -1 for the patch, I would commit it (I'll wait another day 
> for comments). An additional improvement I want to make is to add a 
> createProject() method in ProjectHelper and use it instead of 
> new Project().

To tell you the truth I have had no chance to look at your proposed changes,
but since in my <antlib> proposal I am heavily modifying ProjectHelper
I feel concerned :-o

If I understand correctly what you are trying to achieve, I would suggest defining
a new factory class that is the one having the createProject() method and that can be
driven by whatever is controling ANT.

In my view ProjectHelper should stay as the default implementation used by the factory
which should mean real minimal changes to ProjectHelper as such.

So ProjectFactory, should be the thing to work on.

Am I completely off the mark? As I said I have had no time to look at your changes.

> That would allow a helper plugin to better embed ant.
> There are many use cases:
> - an IDE using ant, that may construct the targets/tasks on the fly, from
> internal data - without using XML at all.
> - embedding ant in a webapp or SOAP service, and using the POST
> data to drive it.
> - someone using ant for 'scripting' or some other evil use, and using
> a plugin that supports modifiable variables ( hopefully with a proper
> declaration and leaving the 'normal' properties unmodifiable ).
> I would also like to commit some changes to the Ant task, making
> it useable as an independent component that would jumpstart ant.
> ( I already wrote an 'EmbededAnt', by refactoring Main, but Ant task
> seems a much better place to do that ).
> I'll mark all new properties as 'experimental' and make sure the 
> current behavior is preserved, of course ( and send a patch for
> review before commiting )

This looks like something I had always thought we should have done, which is
that the behaviour of calling ANT from the command line should be exactly
the execution of:
    <ant target="targets" >
        <param .../>

That would have save us so many inconsistencies :(

Maybe you could put your changes in the sandbox so that we can look at it more precisely.

Jose Alberto

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message