On Wed, 31 Jul 2002, Jose Alberto Fernandez wrote:
> I will try to present a different argument on how to view this problem:
> If you take a look at *MAKE* one option they have and we do not is
> (I think) -n which allows to run the makefile without executing the commands.
That's a good idea.
I'm not sure about the proposed implementation, and how to keep things
simple.
I don't know any task that needs this - all are either 'dry' or active.
So a marker interface ( or method signature for 'TaskAdapted',
ant-independent beans ) whould be enough.
Costn
>
> This is easy in MAKE because of the separation between shell lines whose
> execution is controlled by this option, and variable declarations and such
> still executed by MAKE. What we need is this functionality. With that, we
> could
> have a "-dryrun" option that executes nothing (almost nothing) and it could be
> used by the "-projecthelp" option in order to get the behaviour we are
> fighting about.
>
> So here is my view on how to achive this in ANT1.x:
>
> 1) Add a new method to the basic Task definition:
>
> public void executeDryRun() { /* Defined as do nothing but could just
> log something */ }
>
> 2) Modify the perform() method to either call "execute()" or "executeDryRun"
> depending
> on the type of execution.
>
> 3) Modify things that we think should be evaluated during a dryrun as follows:
>
> public void executeDryRun() { execute(); }
>
> 4) Make -projecthelp implicitly set -dryrun.
>
> With this, I think we can solve all the issues: keep <import> working fine,
> keep the -projecthelp camp happy, get some new useful functionality out of
> all this,
> and it is easy to document ("The <property> task executes on dry runs").1
>
> Makes it very simple and understandable.
>
> Please lets agree on something and move on.
>
> Jose Alberto
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>