maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <>
Subject Re: Artifact instances in a reactor build
Date Mon, 15 Feb 2010 14:05:58 GMT
Our assumption thus far has been that for a given build, including within a reactor, that the
dependencies would boil down to a graph so by definition one instance. I think what you're
seeing is the transformation of the tree to a graph and having leftovers.  So for right now,
for all the use cases that we purport to deal with assumes a graph structure in the end. For
typical Java this makes sense because we're dealing a normal classloader structure where there
is generally one per runtime, or at best one per application like a webapp. 

The one concrete use case that we have in Tycho right now is that because OSGi's classloaders
are more sophisticated what we have there is resolution per project in a given reactor because
given N bundles each may have a different of of artifact A with no adverse affects. And the
transitive closure of A may be different in each case.

So I would do anything now that assumes the graph for a reactor, and eventually we'll figure
out how to merge in the concepts from Tycho where we truly will have multiple graphs.

Some other things to note is that you should probably chat with Benjamin as there is a rework
of the artifact resolution API on a branch that probably won't make it into 3.0 but I'd like
your changes not to impede the absorption of those changes ultimately.

On Feb 13, 2010, at 3:34 PM, Kristian Rosenvold wrote:

> It seems like an artifact with coordinates X has one separate instance
> of DefaultArtifact in each project it appears. So project P0 has
> instance X1 and P1 has instance X2. When the jar plugin in P0 calls
> setFile on X1, X2 does not get updated.
> Is there a well-defined business case for this behaviour ? I suppose in
> "linear" maven these instances are not concurrently in service, and it
> may not matter too much. Since I feel they represent underlying
> singletons, I'd like to make them so. Anyone have any good reason not
> to ? (I was /thinking/ along the lines that there may be something
> related to snapshot versions, but that's just a little over my head) 
> (The reason I'm asking is that I find myself writing some fairly 
> questionable code to transfer attributes from X1->X2)
> Kristian
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:



Jason van Zyl
Founder,  Apache Maven

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message