ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: "ant call trigger can only be used from an ant build" from ant build
Date Thu, 10 May 2007 17:03:08 GMT
On 5/10/07, Jarosław Wypychowski <J.Wypychowski@icm.edu.pl> wrote:
>
> Dnia 10-05-2007, czw o godzinie 16:24 +0200, Xavier Hanin napisał(a):
> > On 5/10/07, Gilles Scokart <gscokart@gmail.com> wrote:
> > >
> > > Personally I prefer the abstract doExecute and the final execute
> because
> > > it
> > > make it clear which code is executed before and after the task.  I
> fear
> > > that
> > > an event handler registered to the project will not be so clear.
> >
> >
> > I agree it is more clear, but I was looking for some kind of life cycle
> > already handled by Ant, and found only these events. But maybe using our
> own
> > life cycle of execute makes more sense.
> >
> > Any other opinion?
> I think that You are talking about BuildListener. I don't like the idea
> of controlling the reference stack with generic listeners. First - do
> they control only subclasses of IvyTask ?
>
> I would suggest that we make a different thing:
> IvyTask{
>         final execute(){
>                 try{
>                         prepareTask();
>                         doExecute();
>                 } finally {
>                         finalizeTask();
>                 }
>         }
>         public void prepareTask(){
>                 stackAdd
>         }
>         public void finalizeTask(){
>                 stackRemove
>         }
> }
>
> Then it would be clear that if you want to take advantage of default Ivy
> mechanisms you have to follow the 3 step task management.
>
> As for top against peek - I didn't thought of Stack interface - feel
> free to correct that. I can modify the sources according to the above
> and change top into peek.


+1 :-)

Xavier

--jw
>
> --
> Jaroslaw Wypychowski
> Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego UW
> jarwyp@icm.edu.pl
>
>


-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message