maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Fedorenko <>
Subject Re: Artifact instances in a reactor build
Date Mon, 15 Feb 2010 05:14:32 GMT
I am not 100% sure, but I think this may break MavenMetadataCache, which
caches Artifact instances and assumes they do not change. In m2e, for
example, we do not flash the cache before each build, only when project
pom.xml changes. So if one of mojos changes cached Artifact instance,
next build may misbehave.


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:

View raw message