You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Jean-Baptiste Quenot <jb...@apache.org> on 2007/05/29 12:39:11 UTC

Extending IvyBuildList

Hi Ivy,

Thanks for  providing this  great API,  and more  particularly the
IvyBuildList  Ant  task  that  I  extend  to  generate  my  Hudson
configuration  files  automatically  for continuous  build  of  my
project.

I only  had to slightly modify  it to be  able to get the  list of
sorted modules,  and the  list of build  files.  See  the attached
patch.

NOTE: this patch is based on  Ivy 1.4.1, but it should be possible
to do the same thing on trunk (the patch does not apply on trunk).

If this change makes sense to you, I can file a JIRA issue.

WDYT?
-- 
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Re: Extending IvyBuildList

Posted by Steve Loughran <st...@apache.org>.
John Gill wrote:
> No Generics!!! It makes the code so much cleaner... I wonder how many
> developers are still stuck on 1.4 (Ivy/Ant/Maven users in particular)?
> 1.4is two version behind the latest now...


I think you may find that java1.5 generics actually dangerous in some 
places, as it doesnt do what you expect from a real generics system; its 
works than C++ and .NET's generics, let alone fancy things like ML. I 
know foreach loops are nice, and Iterable something to implement, but 
there is still something missing there.


Our work stuff is java1.4 in the core, some of the stuff 1.5 on the 
edges. we have a CI server building and testing under 1.4 to make sure 
all works, but cutting a release is still tricky as you cannot compile 
against existing classes which added more restrictive arguments in 
java1.5. For example, any method that took (Object) and then overloaded 
it with String in java 1.5, as the 1.5 code, even when built with the 
-1.4 options, will bind to the String implementation.

Next release, we move up to java1.5, although then we have to worry 
about 1.6 support in places too. Sigh.

-steve

Re: Extending IvyBuildList

Posted by John Gill <ll...@gmail.com>.
No Generics!!! It makes the code so much cleaner... I wonder how many
developers are still stuck on 1.4 (Ivy/Ant/Maven users in particular)?
1.4is two version behind the latest now...

On 5/29/07, Xavier Hanin <xa...@gmail.com> wrote:
>
> Hi,
>
> Simple and interesting change, indeed, I think it doesn't hurt to open an
> issue :). For the patch, the only thing is that we are jdk 1.4 compliant,
> so
> the use of generics is prohibited.
>
> Xavier
>
> On 5/29/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
> >
> > Hi Ivy,
> >
> > Thanks for  providing this  great API,  and more  particularly the
> > IvyBuildList  Ant  task  that  I  extend  to  generate  my  Hudson
> > configuration  files  automatically  for continuous  build  of  my
> > project.
> >
> > I only  had to slightly modify  it to be  able to get the  list of
> > sorted modules,  and the  list of build  files.  See  the attached
> > patch.
> >
> > NOTE: this patch is based on  Ivy 1.4.1, but it should be possible
> > to do the same thing on trunk (the patch does not apply on trunk).
> >
> > If this change makes sense to you, I can file a JIRA issue.
> >
> > WDYT?
> > --
> >      Jean-Baptiste Quenot
> > aka  John Banana   Qwerty
> > http://caraldi.com/jbq/
> >
> >
>
>
> --
> Xavier Hanin - Independent Java Consultant
> Manage your dependencies with Ivy!
> http://incubator.apache.org/ivy/
>



-- 
Regards,
John Gill

Re: Extending IvyBuildList

Posted by Xavier Hanin <xa...@gmail.com>.
Hi,

Simple and interesting change, indeed, I think it doesn't hurt to open an
issue :). For the patch, the only thing is that we are jdk 1.4 compliant, so
the use of generics is prohibited.

Xavier

On 5/29/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
>
> Hi Ivy,
>
> Thanks for  providing this  great API,  and more  particularly the
> IvyBuildList  Ant  task  that  I  extend  to  generate  my  Hudson
> configuration  files  automatically  for continuous  build  of  my
> project.
>
> I only  had to slightly modify  it to be  able to get the  list of
> sorted modules,  and the  list of build  files.  See  the attached
> patch.
>
> NOTE: this patch is based on  Ivy 1.4.1, but it should be possible
> to do the same thing on trunk (the patch does not apply on trunk).
>
> If this change makes sense to you, I can file a JIRA issue.
>
> WDYT?
> --
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/
>
>


-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Re: Published API (was Extending IvyBuildList)

Posted by Xavier Hanin <xa...@gmail.com>.
On 5/29/07, Gilles Scokart <gs...@gmail.com> wrote:
>
>
> The mail of Jean-Baptiste raises a question:  What is our published API?
>
> For the moment we only considered the backward compatibility of our ant
> interface. But that should maybe change.
>
> Shouldn't we start to define what is our published API, what are the
> internal classes subject to changes, and what are the 'stable' interface
> that can be reused?
>
> I guess that's an important information for an open source project.  But
> it
> is also something difficult and it might quickly be heavy.
>
> WDYT?


I'm not sure it's related to being open source or not, but more to the use
cases we want to address. For the moment Ivy is documented to be usable by
two means: from ant or from the command line. From my experience the command
line use is marginal. Another mean to use Ivy is to embed it and use classes
and interfaces directly. This is what is done in IvyDE, but even though Ivy
has been designed to make it possible (no dependency on Ant), this is not
documented, and we are still far from providing a clean interface for this.

As Stephane said, the code is not ready to provide such an interface, and I
agree when you say we should keep it as small as possible. But this is an
important point if we want to increase the use of Ivy as a library - which
could be interesting for other projects.

Xavier

Gilles
>
> > -----Original Message-----
> > From: Jean-Baptiste Quenot [mailto:jbq@apache.org]
> > Sent: mardi 29 mai 2007 12:39
> > To: ivy-user@incubator.apache.org
> > Subject: Extending IvyBuildList
> >
> > Hi Ivy,
> >
> > Thanks for  providing this  great API,  and more  particularly the
> > IvyBuildList  Ant  task  that  I  extend  to  generate  my  Hudson
> > configuration  files  automatically  for continuous  build  of  my
> > project.
> >
> > I only  had to slightly modify  it to be  able to get the  list of
> > sorted modules,  and the  list of build  files.  See  the attached
> > patch.
> >
> > NOTE: this patch is based on  Ivy 1.4.1, but it should be possible
> > to do the same thing on trunk (the patch does not apply on trunk).
> >
> > If this change makes sense to you, I can file a JIRA issue.
> >
> > WDYT?
> > --
> >      Jean-Baptiste Quenot
> > aka  John Banana   Qwerty
> > http://caraldi.com/jbq/
>
>


-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Re: Published API (was Extending IvyBuildList)

Posted by Xavier Hanin <xa...@gmail.com>.
On 5/29/07, Stephane Bailliez <sb...@gmail.com> wrote:
>
> Gilles Scokart wrote:
> > The mail of Jean-Baptiste raises a question:  What is our published API?
> >
> > For the moment we only considered the backward compatibility of our ant
> > interface. But that should maybe change.
> >
> > Shouldn't we start to define what is our published API, what are the
> > internal classes subject to changes, and what are the 'stable' interface
> > that can be reused?
> >
> > I guess that's an important information for an open source project.  But
> it
> > is also something difficult and it might quickly be heavy.
> >
> IMHO the code is not ready to effectively have a published API yet


Agreed

and
> if you do that this will affect further your ability to evolve it
> without breaking everything. (and it's hard enough from a behavior point
> of view) You'll have to be pretty strict on what is published and I'm
> not sure it can be done right now.
>
> This innocent change of setting 2 public getters to get the results post
> execution is actually interesting in itself.-
> - it does not need to be public but more protected.
> - I find it a bit unusual to have getters for post execution results in
> Ant tasks, I'm very uncomfortable with this generally


How would you make those results available? With a reference in the Project?
Or maybe we should recommend to use the base unstable API instead of trying
to use the ant task for that?

Xavier

- you may have to live with it for quite some time
>
> -- stephane
>



-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Re: Published API (was Extending IvyBuildList)

Posted by Stephane Bailliez <sb...@gmail.com>.
Gilles Scokart wrote:
> The mail of Jean-Baptiste raises a question:  What is our published API?
>
> For the moment we only considered the backward compatibility of our ant
> interface. But that should maybe change.
>
> Shouldn't we start to define what is our published API, what are the
> internal classes subject to changes, and what are the 'stable' interface
> that can be reused?
>
> I guess that's an important information for an open source project.  But it
> is also something difficult and it might quickly be heavy.
>   
IMHO the code is not ready to effectively have a published API yet and 
if you do that this will affect further your ability to evolve it 
without breaking everything. (and it's hard enough from a behavior point 
of view) You'll have to be pretty strict on what is published and I'm 
not sure it can be done right now.

This innocent change of setting 2 public getters to get the results post 
execution is actually interesting in itself.-
- it does not need to be public but more protected.
- I find it a bit unusual to have getters for post execution results in 
Ant tasks, I'm very uncomfortable with this generally
- you may have to live with it for quite some time

-- stephane

Published API (was Extending IvyBuildList)

Posted by Gilles Scokart <gs...@gmail.com>.
The mail of Jean-Baptiste raises a question:  What is our published API?

For the moment we only considered the backward compatibility of our ant
interface. But that should maybe change.

Shouldn't we start to define what is our published API, what are the
internal classes subject to changes, and what are the 'stable' interface
that can be reused?

I guess that's an important information for an open source project.  But it
is also something difficult and it might quickly be heavy.

WDYT?

Gilles

> -----Original Message-----
> From: Jean-Baptiste Quenot [mailto:jbq@apache.org]
> Sent: mardi 29 mai 2007 12:39
> To: ivy-user@incubator.apache.org
> Subject: Extending IvyBuildList
> 
> Hi Ivy,
> 
> Thanks for  providing this  great API,  and more  particularly the
> IvyBuildList  Ant  task  that  I  extend  to  generate  my  Hudson
> configuration  files  automatically  for continuous  build  of  my
> project.
> 
> I only  had to slightly modify  it to be  able to get the  list of
> sorted modules,  and the  list of build  files.  See  the attached
> patch.
> 
> NOTE: this patch is based on  Ivy 1.4.1, but it should be possible
> to do the same thing on trunk (the patch does not apply on trunk).
> 
> If this change makes sense to you, I can file a JIRA issue.
> 
> WDYT?
> --
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/


RE: Extending IvyBuildList

Posted by Gilles Scokart <gs...@gmail.com>.
Sure, it makes sense.  It is only a minor change that allows the task to be
reusable.


Gilles

> -----Original Message-----
> From: Jean-Baptiste Quenot [mailto:jbq@apache.org]
> Sent: mardi 29 mai 2007 12:39
> To: ivy-user@incubator.apache.org
> Subject: Extending IvyBuildList
> 
> Hi Ivy,
> 
> Thanks for  providing this  great API,  and more  particularly the
> IvyBuildList  Ant  task  that  I  extend  to  generate  my  Hudson
> configuration  files  automatically  for continuous  build  of  my
> project.
> 
> I only  had to slightly modify  it to be  able to get the  list of
> sorted modules,  and the  list of build  files.  See  the attached
> patch.
> 
> NOTE: this patch is based on  Ivy 1.4.1, but it should be possible
> to do the same thing on trunk (the patch does not apply on trunk).
> 
> If this change makes sense to you, I can file a JIRA issue.
> 
> WDYT?
> --
>      Jean-Baptiste Quenot
> aka  John Banana   Qwerty
> http://caraldi.com/jbq/