You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jason van Zyl <ja...@maven.org> on 2008/08/06 01:26:13 UTC
Artifact Resolution
Oleg,
Not sure if you've seen this, but could you take a crack at
integrating this, if applicable, into the Mercury write up?
http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
the course of true love never did run smooth ...
-- Shakespeare
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Artifact Resolution
Posted by Oleg Gusakov <ol...@gmail.com>.
This document discusses POM processing in great detail, while in Mercury
we abstracted it into external interface MetadataProcessor. You give it
GAV to the POM, MetadataReader and it returns back a list of dependency
GAVs interpolated for the given environment. Not transitive - just
direct dependencies.
List<ArtifactBasicMetadata> getDependencies( ArtifactBasicMetadata bmd,
MetadataReader mdReader, Hashtable env )
throws MetadataProcessingException;
MetadataReader is implemented by Mercury as all it does is: given GAV -
returns back POM bytes, so that MetadataProcessor have something to
interpret.
public byte [] readMetadata( ArtifactBasicMetadata bmd )
throws MetadataProcessingException;
Then Mercury concentrates on building the dependency tree for transitive
dependencies and resolving conflicts for a particular scope.
So majority of the document applies to MetadataProcessor abstraction,
and ProjectBuilder is the perfect candidate :)
I will write up the overall process and integrate that piece.
Thanks,
Oleg
Jason van Zyl wrote:
> Oleg,
>
> Not sure if you've seen this, but could you take a crack at
> integrating this, if applicable, into the Mercury write up?
>
> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> the course of true love never did run smooth ...
>
> -- Shakespeare
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Artifact Resolution
Posted by Brett Porter <br...@apache.org>.
There's also this from John:
http://docs.codehaus.org/display/MAVEN/Conflict+Resolution
It'd also be worth reviewing the "requirements" for 2.0.x to see if
anything carries over:
http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
How does Mercury handle the question of scope? Is that contained
within the MetadataProcessor and so delegated to maven-project?
Thanks,
Brett
On 06/08/2008, at 11:34 PM, Jason van Zyl wrote:
> Here's the collector page where you might want to add your stuff:
>
> http://docs.codehaus.org/display/MAVEN/Mercury
>
> and here's the nitty gritty:
>
> http://docs.codehaus.org/display/MAVEN/SAT+Based+Dependency+Resolution
>
> And a lot of this document should be reconciled as well:
>
> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>
> I think you and Oleg are most familiar with how you want this system
> to be used insofar as conflict resolvers in particular and getting
> those ideas aligned is important. It's also important to get the
> general usage and API we present to users codified. I've asked a few
> people who have used the existing implementation (Jason Dillion who
> uses it in GShell, Jan who uses it in the Jetty plugin, Eugene/Igor
> who use it in m2eclipse) and people who might if it was better.
> Alexis who created POMStrap I've asked to look at Mercury.
>
> I also talk about why I think Mercury is the way forward in the
> future here:
>
> http://svn.apache.org/repos/asf/maven/site/branches/maven-2.1-doco/maven-2.1-architectural-goals.apt
>
> On 6-Aug-08, at 1:53 AM, Mark Hobson wrote:
>
>> Hi guys,
>>
>> I'm happy to take a look at the new Mercury code and make sure it
>> supersedes my conflict resolvers patch. Any pointers to
>> documentation
>> and code would be appreciated.
>>
>> Cheers,
>>
>> Mark
>>
>> 2008/8/6 Jason van Zyl <ja...@maven.org>:
>>> Mark/Oleg,
>>>
>>> Just wanted to make sure you guys were synced as Mark has written
>>> this:
>>>
>>> http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers
>>>
>>> And I know the plug points in Mercury provide by SAT4J deal with
>>> most of
>>> these but just trying to guide things into the same funnel.
>>>
>>> On 5-Aug-08, at 4:26 PM, Jason van Zyl wrote:
>>>
>>>> Oleg,
>>>>
>>>> Not sure if you've seen this, but could you take a crack at
>>>> integrating
>>>> this, if applicable, into the Mercury write up?
>>>>
>>>>
>>>> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>>>>
>>>> Thanks,
>>>>
>>>> Jason
>>>>
>>>> ----------------------------------------------------------
>>>> Jason van Zyl
>>>> Founder, Apache Maven
>>>> jason at sonatype dot com
>>>> ----------------------------------------------------------
>>>>
>>>> the course of true love never did run smooth ...
>>>>
>>>> -- Shakespeare
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder, Apache Maven
>>> jason at sonatype dot com
>>> ----------------------------------------------------------
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> We know what we are, but know not what we may be.
>
> -- Shakespeare
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Artifact Resolution
Posted by Jason van Zyl <ja...@maven.org>.
Here's the collector page where you might want to add your stuff:
http://docs.codehaus.org/display/MAVEN/Mercury
and here's the nitty gritty:
http://docs.codehaus.org/display/MAVEN/SAT+Based+Dependency+Resolution
And a lot of this document should be reconciled as well:
http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
I think you and Oleg are most familiar with how you want this system
to be used insofar as conflict resolvers in particular and getting
those ideas aligned is important. It's also important to get the
general usage and API we present to users codified. I've asked a few
people who have used the existing implementation (Jason Dillion who
uses it in GShell, Jan who uses it in the Jetty plugin, Eugene/Igor
who use it in m2eclipse) and people who might if it was better. Alexis
who created POMStrap I've asked to look at Mercury.
I also talk about why I think Mercury is the way forward in the future
here:
http://svn.apache.org/repos/asf/maven/site/branches/maven-2.1-doco/maven-2.1-architectural-goals.apt
On 6-Aug-08, at 1:53 AM, Mark Hobson wrote:
> Hi guys,
>
> I'm happy to take a look at the new Mercury code and make sure it
> supersedes my conflict resolvers patch. Any pointers to documentation
> and code would be appreciated.
>
> Cheers,
>
> Mark
>
> 2008/8/6 Jason van Zyl <ja...@maven.org>:
>> Mark/Oleg,
>>
>> Just wanted to make sure you guys were synced as Mark has written
>> this:
>>
>> http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers
>>
>> And I know the plug points in Mercury provide by SAT4J deal with
>> most of
>> these but just trying to guide things into the same funnel.
>>
>> On 5-Aug-08, at 4:26 PM, Jason van Zyl wrote:
>>
>>> Oleg,
>>>
>>> Not sure if you've seen this, but could you take a crack at
>>> integrating
>>> this, if applicable, into the Mercury write up?
>>>
>>>
>>> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder, Apache Maven
>>> jason at sonatype dot com
>>> ----------------------------------------------------------
>>>
>>> the course of true love never did run smooth ...
>>>
>>> -- Shakespeare
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder, Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
We know what we are, but know not what we may be.
-- Shakespeare
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Artifact Resolution
Posted by Mark Hobson <ma...@gmail.com>.
Hi Oleg,
That sounds all good. One of the issues that my proposal didn't
cover, which I think is worth exploring, is that of conflict resolver
scope. The potential problem I see is that as soon as we allow the
conflict resolution strategy to be configurable, we introduce the
possibility of having two projects within the dependency graph that
specify different strategies.
There are two obvious solutions to this: 1) the dominant strategy
takes precedence and resolves the entire graph; 2) the strategies are
applied to their respective sub-graphs. Note that the former option
also introduces the perverse requirement of conflict resolver conflict
resolvers ;) I think that the second option would result in the most
correct resolution, although naturally it would be harder to
implement. What do you think?
Has there been any decision on how to specify conflict resolvers in
the pom yet? I covered a few potential syntaxes in my proposal. I
assume that custom conflict resolvers can be plugged in via
extensions?
I'd love to give Mercury a test-drive - is there any code publicly
available yet? Any ETA on getting this into trunk? Keep up the good
work :)
Cheers,
Mark
2008/8/6 Oleg Gusakov <ol...@gmail.com>:
> Excellent!
>
> Mark - regarding you document: I abstracted conflict resolution even more:
> one of the inputs to the DependencyBuilder is a List<Comparator> - good old
> java comparators that can compare tree nodes. When tree is being created,
> all tree nodes are sorted by these comparators and results are added to SAT
> equations.
>
> Two important things: List - order of Comparators is very important - if you
> apply newest first, then depth - results might be different from depth
> first, then newest. They compare not just GAVs, but real tree nodes, that
> gives them insight into tree structure.
>
> I implemented the two mentioned policies: nearest/farthest and newest/oldest
> and we can configure them as you indicated. But we also need an option to
> allow users construct their own comparator list.
>
> What do you think?
>
> Thanks,
> Oleg
>
> Mark Hobson wrote:
>>
>> Hi guys,
>>
>> I'm happy to take a look at the new Mercury code and make sure it
>> supersedes my conflict resolvers patch. Any pointers to documentation
>> and code would be appreciated.
>>
>> Cheers,
>>
>> Mark
>>
>> 2008/8/6 Jason van Zyl <ja...@maven.org>:
>>
>>>
>>> Mark/Oleg,
>>>
>>> Just wanted to make sure you guys were synced as Mark has written this:
>>>
>>> http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers
>>>
>>> And I know the plug points in Mercury provide by SAT4J deal with most of
>>> these but just trying to guide things into the same funnel.
>>>
>>> On 5-Aug-08, at 4:26 PM, Jason van Zyl wrote:
>>>
>>>
>>>>
>>>> Oleg,
>>>>
>>>> Not sure if you've seen this, but could you take a crack at integrating
>>>> this, if applicable, into the Mercury write up?
>>>>
>>>>
>>>>
>>>> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>>>>
>>>> Thanks,
>>>>
>>>> Jason
>>>>
>>>> ----------------------------------------------------------
>>>> Jason van Zyl
>>>> Founder, Apache Maven
>>>> jason at sonatype dot com
>>>> ----------------------------------------------------------
>>>>
>>>> the course of true love never did run smooth ...
>>>>
>>>> -- Shakespeare
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder, Apache Maven
>>> jason at sonatype dot com
>>> ----------------------------------------------------------
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Artifact Resolution
Posted by Oleg Gusakov <ol...@gmail.com>.
Excellent!
Mark - regarding you document: I abstracted conflict resolution even
more: one of the inputs to the DependencyBuilder is a List<Comparator> -
good old java comparators that can compare tree nodes. When tree is
being created, all tree nodes are sorted by these comparators and
results are added to SAT equations.
Two important things: List - order of Comparators is very important - if
you apply newest first, then depth - results might be different from
depth first, then newest. They compare not just GAVs, but real tree
nodes, that gives them insight into tree structure.
I implemented the two mentioned policies: nearest/farthest and
newest/oldest and we can configure them as you indicated. But we also
need an option to allow users construct their own comparator list.
What do you think?
Thanks,
Oleg
Mark Hobson wrote:
> Hi guys,
>
> I'm happy to take a look at the new Mercury code and make sure it
> supersedes my conflict resolvers patch. Any pointers to documentation
> and code would be appreciated.
>
> Cheers,
>
> Mark
>
> 2008/8/6 Jason van Zyl <ja...@maven.org>:
>
>> Mark/Oleg,
>>
>> Just wanted to make sure you guys were synced as Mark has written this:
>>
>> http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers
>>
>> And I know the plug points in Mercury provide by SAT4J deal with most of
>> these but just trying to guide things into the same funnel.
>>
>> On 5-Aug-08, at 4:26 PM, Jason van Zyl wrote:
>>
>>
>>> Oleg,
>>>
>>> Not sure if you've seen this, but could you take a crack at integrating
>>> this, if applicable, into the Mercury write up?
>>>
>>>
>>> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder, Apache Maven
>>> jason at sonatype dot com
>>> ----------------------------------------------------------
>>>
>>> the course of true love never did run smooth ...
>>>
>>> -- Shakespeare
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder, Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
>
Re: Artifact Resolution
Posted by Mark Hobson <ma...@gmail.com>.
Hi guys,
I'm happy to take a look at the new Mercury code and make sure it
supersedes my conflict resolvers patch. Any pointers to documentation
and code would be appreciated.
Cheers,
Mark
2008/8/6 Jason van Zyl <ja...@maven.org>:
> Mark/Oleg,
>
> Just wanted to make sure you guys were synced as Mark has written this:
>
> http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers
>
> And I know the plug points in Mercury provide by SAT4J deal with most of
> these but just trying to guide things into the same funnel.
>
> On 5-Aug-08, at 4:26 PM, Jason van Zyl wrote:
>
>> Oleg,
>>
>> Not sure if you've seen this, but could you take a crack at integrating
>> this, if applicable, into the Mercury write up?
>>
>>
>> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder, Apache Maven
>> jason at sonatype dot com
>> ----------------------------------------------------------
>>
>> the course of true love never did run smooth ...
>>
>> -- Shakespeare
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Artifact Resolution
Posted by Jason van Zyl <ja...@maven.org>.
Mark/Oleg,
Just wanted to make sure you guys were synced as Mark has written this:
http://docs.codehaus.org/display/MAVEN/Conflict+Resolvers
And I know the plug points in Mercury provide by SAT4J deal with most
of these but just trying to guide things into the same funnel.
On 5-Aug-08, at 4:26 PM, Jason van Zyl wrote:
> Oleg,
>
> Not sure if you've seen this, but could you take a crack at
> integrating this, if applicable, into the Mercury write up?
>
> http://docs.codehaus.org/display/MAVEN/Maven+2.1+Artifact+Resolution+Specification
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Apache Maven
> jason at sonatype dot com
> ----------------------------------------------------------
>
> the course of true love never did run smooth ...
>
> -- Shakespeare
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org