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 13:23:18 GMT
On 5/10/07, Xavier Hanin <xavier.hanin@gmail.com> wrote:
>
> There is however a slight problem - this makes the API incompatible with
> > 2.0.0-alpha-1. It is possible to make doExecute not abstract in IvyTask
> > and therefore validate all the other tasks that are kept by people, but
> > this can lead to hard to find errors.
>
>
> breaking the API is not a major problem, Ivy 2.0 is already breaking a lot
> of API, and we named our last release alpha because it is still subject to
> API break (I tihnk we warn users against that in the release notes). So I
> prefer having things like this, we may even declare execute final to make
> sure it isn't overridden improperly. I'll review your patch soon and apply
> it.
>

I may have found another way of doing things before and after the task is
executed without breaking the API and the conventions when writing ant task.
Indeed Ant fire events before starting a task and after finishing it (see
the perform method). So we may register as a listener of the project in the
init method of IvyTask, then push on task started and pop on task finished.
Each task would be responsible for its own events only.
The drawback of this approach is that if someone calls execute directly (a
public method) instead of perform, we won't get the correct context. This is
not what programs are supposed to do, so I don't know if it's really a
problem or not (I realize I usually call execute instead of perform, which
is not a good thing :-( ).

So, what do you think?

Xavier

Xavier
>
> Best Regards.
> >
> > --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/
>



-- 
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