You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Maarten Coene <ma...@yahoo.com> on 2009/03/09 18:09:33 UTC

changing Ivy retrieve behaviour

Hi,

I would like to change the Ivy retrieve behaviour regarding conflict handling when multiple artifacts are retrieved to the same file.
At the moment, Ivy has some kind of retrieve-conflict-manager which selects the "best" artifact, based on the revision of the conflicting modules.
This doesn't work when multiple artifacts of the same module is retrieved to the same file. At the moment, this is causing problems with the maven source/javadoc artifacts which are sometimes retrieved instead of the class-files.

I would like to change this so that Ivy throws an error if multiple different artifacts map to the same file.
Any objections?

Maarten



      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: changing Ivy retrieve behaviour

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-03-09, Gilles Scokart <gs...@gmail.com> wrote:

> 2009/3/9 Maarten Coene <ma...@yahoo.com>

>> I would like to change this so that Ivy throws an error if multiple
>> different artifacts map to the same file.

Is this a condition a user can fix?  Or is the reason bad upstream
metadata?

> I think failing the build is indeed the best aproach.  But I fear some build
> that might be broken.  Isn't it?

It may be better to fail than to have the build randomly fail or pass
depending on which of the possible artifacts has been used.

I don't really know what I'm talking about, though 8-)

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: changing Ivy retrieve behaviour

Posted by Xavier Hanin <xa...@gmail.com>.
On Tue, Mar 17, 2009 at 12:32 AM, Maarten Coene <ma...@yahoo.com>wrote:

>
> I've updated the RetrieveEngine to throw an error if multiple artifacts of
> the same module are mapped to the same filename.
> The behaviour when multiple artifacts of different modules are mapped to
> the same filename hasn't been changed.
>
> Could you review this change and are you ok to include that in a 2.0.1
> release?

I've reviewed your change, I'm ok to include it in 2.0.1.

>
> If so, I'll start with preparing the 2.0.1 release, unless someone else
> want to make the 2.0.1 release.

Great! Thanks for stepping in Maarten!

Xavier


>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Xavier Hanin <xa...@gmail.com>
> To: Ant Developers List <de...@ant.apache.org>
> Sent: Thursday, March 12, 2009 12:00:19 PM
> Subject: Re: changing Ivy retrieve behaviour
>
> > Or maybe we could adapt the current conflict strategy to only to select
> the
> > latest version of the same artifact (same name, type, extension, extra
> > attributes) and throw an error in any other situation.
>
> That sounds good indeed, and I agree in this case it could be considered
> more or less as a bug fix rather than a real change  in behaviour. So in
> this case I'd even be ok to put it in a 2.0.x release.
>
> Xavier
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Xavier Hanin - 4SH France
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/

Re: changing Ivy retrieve behaviour

Posted by Maarten Coene <ma...@yahoo.com>.
I've updated the RetrieveEngine to throw an error if multiple artifacts of the same module are mapped to the same filename.
The behaviour when multiple artifacts of different modules are mapped to the same filename hasn't been changed.

Could you review this change and are you ok to include that in a 2.0.1 release?
If so, I'll start with preparing the 2.0.1 release, unless someone else want to make the 2.0.1 release.

Maarten




----- Original Message ----
From: Xavier Hanin <xa...@gmail.com>
To: Ant Developers List <de...@ant.apache.org>
Sent: Thursday, March 12, 2009 12:00:19 PM
Subject: Re: changing Ivy retrieve behaviour

> Or maybe we could adapt the current conflict strategy to only to select the
> latest version of the same artifact (same name, type, extension, extra
> attributes) and throw an error in any other situation.

That sounds good indeed, and I agree in this case it could be considered
more or less as a bug fix rather than a real change  in behaviour. So in
this case I'd even be ok to put it in a 2.0.x release.

Xavier


      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: changing Ivy retrieve behaviour

Posted by Xavier Hanin <xa...@gmail.com>.
On Tue, Mar 10, 2009 at 9:27 PM, Maarten Coene <ma...@yahoo.com>wrote:

>
> If we make it possible to selet the retrieve conflict strategy, would it be
> ok to make the "fail"-strategy the default one?

I wouldn't do that in a 2.0.x, but in a 2.1 it may be ok

>
>
> Or maybe we could adapt the current conflict strategy to only to select the
> latest version of the same artifact (same name, type, extension, extra
> attributes) and throw an error in any other situation.


> In this situation, retrieving the source and classes artifacts of the same
> module to the same file will result in an error while retrieving the classes
> artifacts of version 1.0 and 1.1 of the same module will result in the
> current behaviour.
>
> This way, we are more or less backwards compatible, and we'll solve a very
> common problem

That sounds good indeed, and I agree in this case it could be considered
more or less as a bug fix rather than a real change  in behaviour. So in
this case I'd even be ok to put it in a 2.0.x release.

Xavier


>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Xavier Hanin <xa...@gmail.com>
> To: Ant Developers List <de...@ant.apache.org>
> Sent: Tuesday, March 10, 2009 5:06:43 PM
> Subject: Re: changing Ivy retrieve behaviour
>
> On Mon, Mar 9, 2009 at 6:53 PM, Gilles Scokart <gs...@gmail.com> wrote:
>
> > I think failing the build is indeed the best aproach.  But I fear some
> > build
> > that might be broken.  Isn't it?
>
> I think some builds would fail, so I'd classify this as non backward
> compatible change. So I think the best would be to be able to select the
> retrieve conflict management strategy, or at least to have the option to
> use
> the current behaviour (simple messages) when needed.
>
> Xavier
>
>
> >
> > I'm also wondering if it is not possible to have warning in the retrieve
> > task when some kind of patterns are used.
> >
> > Gilles Scokart
> >
> >
> > 2009/3/9 Maarten Coene <ma...@yahoo.com>
> >
> > >
> > > Hi,
> > >
> > > I would like to change the Ivy retrieve behaviour regarding conflict
> > > handling when multiple artifacts are retrieved to the same file.
> > > At the moment, Ivy has some kind of retrieve-conflict-manager which
> > selects
> > > the "best" artifact, based on the revision of the conflicting modules.
> > > This doesn't work when multiple artifacts of the same module is
> retrieved
> > > to the same file. At the moment, this is causing problems with the
> maven
> > > source/javadoc artifacts which are sometimes retrieved instead of the
> > > class-files.
> > >
> > > I would like to change this so that Ivy throws an error if multiple
> > > different artifacts map to the same file.
> > > Any objections?
> > >
> > > Maarten
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > > For additional commands, e-mail: dev-help@ant.apache.org
> > >
> > >
> >
>
>
>
> --
> Xavier Hanin - 4SH France
> BordeauxJUG co leader - http://www.bordeauxjug.org/
> Blogger - http://xhab.blogspot.com/
> Apache Ivy Creator - http://ant.apache.org/ivy/
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Xavier Hanin - 4SH France
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/

Re: changing Ivy retrieve behaviour

Posted by Maarten Coene <ma...@yahoo.com>.
If we make it possible to selet the retrieve conflict strategy, would it be ok to make the "fail"-strategy the default one?

Or maybe we could adapt the current conflict strategy to only to select the latest version of the same artifact (same name, type, extension, extra attributes) and throw an error in any other situation.
In this situation, retrieving the source and classes artifacts of the same module to the same file will result in an error while retrieving the classes artifacts of version 1.0 and 1.1 of the same module will result in the current behaviour.

This way, we are more or less backwards compatible, and we'll solve a very common problem

Maarten




----- Original Message ----
From: Xavier Hanin <xa...@gmail.com>
To: Ant Developers List <de...@ant.apache.org>
Sent: Tuesday, March 10, 2009 5:06:43 PM
Subject: Re: changing Ivy retrieve behaviour

On Mon, Mar 9, 2009 at 6:53 PM, Gilles Scokart <gs...@gmail.com> wrote:

> I think failing the build is indeed the best aproach.  But I fear some
> build
> that might be broken.  Isn't it?

I think some builds would fail, so I'd classify this as non backward
compatible change. So I think the best would be to be able to select the
retrieve conflict management strategy, or at least to have the option to use
the current behaviour (simple messages) when needed.

Xavier


>
> I'm also wondering if it is not possible to have warning in the retrieve
> task when some kind of patterns are used.
>
> Gilles Scokart
>
>
> 2009/3/9 Maarten Coene <ma...@yahoo.com>
>
> >
> > Hi,
> >
> > I would like to change the Ivy retrieve behaviour regarding conflict
> > handling when multiple artifacts are retrieved to the same file.
> > At the moment, Ivy has some kind of retrieve-conflict-manager which
> selects
> > the "best" artifact, based on the revision of the conflicting modules.
> > This doesn't work when multiple artifacts of the same module is retrieved
> > to the same file. At the moment, this is causing problems with the maven
> > source/javadoc artifacts which are sometimes retrieved instead of the
> > class-files.
> >
> > I would like to change this so that Ivy throws an error if multiple
> > different artifacts map to the same file.
> > Any objections?
> >
> > Maarten
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
> >
> >
>



-- 
Xavier Hanin - 4SH France
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/



      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: changing Ivy retrieve behaviour

Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Mar 9, 2009 at 6:53 PM, Gilles Scokart <gs...@gmail.com> wrote:

> I think failing the build is indeed the best aproach.  But I fear some
> build
> that might be broken.  Isn't it?

I think some builds would fail, so I'd classify this as non backward
compatible change. So I think the best would be to be able to select the
retrieve conflict management strategy, or at least to have the option to use
the current behaviour (simple messages) when needed.

Xavier


>
> I'm also wondering if it is not possible to have warning in the retrieve
> task when some kind of patterns are used.
>
> Gilles Scokart
>
>
> 2009/3/9 Maarten Coene <ma...@yahoo.com>
>
> >
> > Hi,
> >
> > I would like to change the Ivy retrieve behaviour regarding conflict
> > handling when multiple artifacts are retrieved to the same file.
> > At the moment, Ivy has some kind of retrieve-conflict-manager which
> selects
> > the "best" artifact, based on the revision of the conflicting modules.
> > This doesn't work when multiple artifacts of the same module is retrieved
> > to the same file. At the moment, this is causing problems with the maven
> > source/javadoc artifacts which are sometimes retrieved instead of the
> > class-files.
> >
> > I would like to change this so that Ivy throws an error if multiple
> > different artifacts map to the same file.
> > Any objections?
> >
> > Maarten
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
> >
> >
>



-- 
Xavier Hanin - 4SH France
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/

Re: changing Ivy retrieve behaviour

Posted by Gilles Scokart <gs...@gmail.com>.
I think failing the build is indeed the best aproach.  But I fear some build
that might be broken.  Isn't it?

I'm also wondering if it is not possible to have warning in the retrieve
task when some kind of patterns are used.

Gilles Scokart


2009/3/9 Maarten Coene <ma...@yahoo.com>

>
> Hi,
>
> I would like to change the Ivy retrieve behaviour regarding conflict
> handling when multiple artifacts are retrieved to the same file.
> At the moment, Ivy has some kind of retrieve-conflict-manager which selects
> the "best" artifact, based on the revision of the conflicting modules.
> This doesn't work when multiple artifacts of the same module is retrieved
> to the same file. At the moment, this is causing problems with the maven
> source/javadoc artifacts which are sometimes retrieved instead of the
> class-files.
>
> I would like to change this so that Ivy throws an error if multiple
> different artifacts map to the same file.
> Any objections?
>
> Maarten
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>