maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Rosenvold <kristian.rosenv...@gmail.com>
Subject Re: Artifact instances in a reactor build
Date Mon, 15 Feb 2010 07:51:20 GMT
On Mon, Feb 15, 2010 at 6:14 AM, Igor Fedorenko <igor@ifedorenko.com> wrote:

> 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.
>

Nice tip; I checked the code and there seem to be no dependencies on the
mutable parts of
DefaultArtifact. If it were up to me I'd just make most of DefaultArtifact
final and immutable...

It seems like Brett is right; the "file/resolved" bit in DefaultArtifact
probably shouldn't have been
there, and when I think about it it's probably just used within a single
module build in linear maven. It seems
to me like the artifacts are re-resolved "properly" when proceeding to the
next module; this works
well with clear module boundaries ;)

ATM I solved this problem by re-resolving reactor artifacts when a module
transitions into
packaging, but I'll see if I can improve that once I find out why surefire
won't fire consistently ;)

Kristian

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