Skip to content

Commit

Permalink
[MNG-7228] MavenProject.getOriginalModel returns interpolated parts (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet authored Jun 24, 2023
1 parent 7765635 commit dbfcfd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ private boolean build(
noErrors = false;
}

Model model = result.getFileModel();
Model model = request.getFileModel();

poolBuilder.put(model.getPomFile().toPath(), model);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void testBuildPluginInterpolation() throws Exception {
assertEquals("||${project.basedir}||", originalModel.getProperties().get("prop-outside"));

List<Plugin> outsidePlugins = originalModel.getBuild().getPlugins();
assertEquals(2, outsidePlugins.size());
assertEquals(1, outsidePlugins.size());

checkBuildPluginWithArtifactId(
outsidePlugins,
Expand Down Expand Up @@ -270,7 +270,7 @@ void testReportingPluginInterpolation() throws Exception {
assertEquals("||${project.basedir}||", originalModel.getProperties().get("prop-outside"));

List<ReportPlugin> outsidePlugins = originalModel.getReporting().getPlugins();
assertEquals(2, outsidePlugins.size(), "Wrong number of plugins found");
assertEquals(1, outsidePlugins.size(), "Wrong number of plugins found");

checkReportPluginWithArtifactId(
outsidePlugins,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ protected ModelBuildingResult build(ModelBuildingRequest request, Collection<Str
Model fileModel = readFileModel(request, problems);

request.setFileModel(fileModel);
result.setFileModel(fileModel);
result.setFileModel(fileModel.clone());

activateFileModel(request, result, problems);

Expand Down

0 comments on commit dbfcfd5

Please sign in to comment.