From b551be7445d37e4ba99bf4b976f7c61d6ac52ed8 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Fri, 2 Jul 2021 17:50:44 +0200 Subject: [PATCH] Document hacks as such --- .../org/apache/maven/project/artifact/MavenMetadataSource.java | 1 + .../repository/internal/DefaultArtifactDescriptorReader.java | 1 + 2 files changed, 2 insertions(+) diff --git a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java index 00fbdc8ffc..f0eefc27e9 100644 --- a/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java +++ b/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java @@ -182,6 +182,7 @@ public class MavenMetadataSource Artifact relocatedArtifact = null; + // TODO hack: don't rebuild model if it was already loaded during reactor resolution final WorkspaceReader workspace = legacySupport.getRepositorySession().getWorkspaceReader(); Model model = null; if ( workspace instanceof MavenWorkspaceReader ) diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java index d318395143..eed6f6071e 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java @@ -257,6 +257,7 @@ public class DefaultArtifactDescriptorReader Model model; + // TODO hack: don't rebuild model if it was already loaded during reactor resolution final WorkspaceReader workspace = session.getWorkspaceReader(); if ( workspace instanceof MavenWorkspaceReader ) {