ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remie Bolte" <re...@backbase.com>
Subject Re: EasyAnt phases
Date Fri, 14 Nov 2008 10:09:15 GMT
Perhaps it is possible to create a dependency between phases, and
additionally give targets the possibility to depend on a phase i.e.:


<phase name="phase1" targets="targetA, targetB, targetC" />
<phase name="phase2" targets="targetD, targetE" depends="phase1" />
<phase name="phase3" depends="phase1, phase2" />

<target name="compile" register-to="phase3" />
<target name="build" depends="phase3" />

(please don't mind the names, i'm not following this topic close enough to
know them or make suggestions, it's just an example).

This way it is possible for a target to rely on having a certain build
phases executed. Personally, I don't see a good way of implementing ordering
in phases, wheter or not this is desired. However, I think the concept of
ordering and the community dependency on this behavior should be taken into
this discussion. That was the only point I tried to make :)

BTW: there are situation in our product builds where we specify the
dependencies the way described by Dominique, using the antContrib runtarget
task. I can image that having a dependency task that can be placed at any
point inside a target allows more flexibility.

Cheers,

Remie

p.s.
Thanks again for taking the time to explain certain behavior and past
considerations. Some of my comments and suggestions might feel redundant for
those might have already been discussed in the past.


On Fri, Nov 14, 2008 at 6:02 AM, Stefan Bodewig <bodewig@apache.org> wrote:

> On 2008-11-13, Bruce Atherton <bruce@callenish.com> wrote:
>
> > Conceptually I agree with you, but I think we need to recognize why
> > people would want this and to validate their concerns.
>
> I wasn't advocating we change the current behavior, Ant's own build
> file relies on it in much the same way as
>
> > Consider these targets:
>
> >  <target name="full-build" depends="clean,compile,jar-files">...</target>
> >  <target name="update-build" depends="compile,jar-files">...</target>
>
> for example see the way we structure our test targets.
>
>  <target name="run-tests"
>     depends="dump-info,junit-tests,antunit-tests,check-failed"
>
> and "check-failed" doesn't depend on anything, so with a different
> executor model it might be run before any test has started.
>
> In the context of phases I think we don't need control over ordering
> since the targets that want to add themselves to phases shouldn't
> really depend on each other.  If they do - that's what I meant to say
> - then it smells as if an additional intermediate phase was missing.
>
> But your example got me thinking.  It is pretty easy to imagine that
> there would be "build" and "clean-build" phases much like what you
> have shown with target.  If my target wants to do something only in
> the clean-build phase it will most likely make a difference whether it
> is run before or after "clean".
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message