Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
all
Description
From the email I sent to the m2-dev list detailing this problem:
I just uncovered a problem which is surely present in the current binary bundles of m2. It has to do with projects that depend on poms which utilize interpolation or managed dependencies...
When such a project exists, the first plugin that resolves dependencies will retrieve the correct and complete POM for each dependency, with interpolation and managed deps included. HOWEVER, this first resolution process will result in the models being incorrectly cached in the project builder (cached before they are interpolated or have defaults injected), which means that each subsequent plugin that uses a cached model which utilizes these features will get a "raw" version of the model; that is, with none of these higher-level features included.
As an interim solution, I have disabled cached-model retrieval from the MavenMetadataSource. While this may slow m2 down a bit (since it will have to build the models every time), it will at least provide correct results until we have the time to address this error properly.
ALSO: this is well documented in the code itself (MavenMetadataSource, DefaultMavenProjectBuilder).