ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Parameterized "task-function"
Date Mon, 15 Jan 2001 02:58:10 GMT
At 02:56  12/1/01 -0500, Jason Rosenberg wrote:
>This is a very dangerous precedent, though, since by having the
><script> task, you are inviting lots of backwards compatibility
>complaints in the future.

I don't see anything in you desription that can't be done with xslt/good
build files.

>1. resettable property values.

will be in Ant2.0

>2. direct calling of targets, e.g. <call-target> (not antcall!),
>    with parameterized arguments passed to the target.

will be in Ant2.0

>3. tasks then, need to be dynamically reusable and reconfigurable,
>    so that when they are traversed as part of call-target, they
>    represent fresh instantiations of the task, so that new filesets,
>    etc., can be attached to them.

will be in Ant2.0

>4. more functional boolean logic conditions, with the ability to
>    call a target directly based on the evaluation.  And I am
>    in favor of the boolean logic being expressed in an xml
>    like structure, instead of cryptic C like expressions.  Need
>    else functionality too, and possibly case, etc.

will have better boolean testing in attributes like if/unless and available
but unlikely to have if tasks in Ant2.0.

>5. ability to conditionally gate execution of a target before 
>    evaluating dependencies, as well as after.  Currently,
>    you can only do so after, using  the if/unless syntax.

can you think of a good way of doing this without an extra attribute.
Currently I do this by wrapping it in ant-call

ie

<target name="..." if="precondition">
  <antcall target="mytarget" />
</target>

<target name="mytarget" if="postcondition" depends="...">
...
</target>


>6. simple iteration loops, i'd be happy only with a while loop,
>    which could be implemented very easily (it is essentially
>    a simple goto back to start on condition construct).

will never occur - more likely to build simple declarative structure with
XSLT which has looping/iteration/whatever

>7. improved logging, don't need every target visited reported
>    to the output, etc.  Perhaps just need a -antsilent flag,
>    which suppresses all but explicitly defined task specific output, etc.

agreed.

>The bottom line.  Ant is and should be a scripting language.  When
>you try to say it isn't, you force people down the <script> route,
>as the only recourse, which is nothing but a can of worms.

nope.

>You are trying to say that Ant is just a language for declaring
>a bunch of build data.

Nope ants build.xml format is a declarative form for describing a build
process.


Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message