From 1a65351b43bb09e78f9408c7e579b1951fe6e1bc Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Thu, 22 Apr 2021 18:45:57 +0200 Subject: [PATCH] Revert "[MNG-6772] Prevent Super POM central entry from overriding" This reverts commit 2a23d7bf16612ff1868941669bde3a7d323a93e2. --- .../java/org/apache/maven/project/ProjectModelResolver.java | 2 +- .../apache/maven/repository/internal/DefaultModelResolver.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java b/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java index b1b28ef0e1..9caa3e6c3f 100644 --- a/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java +++ b/maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java @@ -111,7 +111,7 @@ public class ProjectModelResolver this.externalRepositories = original.externalRepositories; this.repositories = new ArrayList<>( original.repositories ); this.repositoryMerging = original.repositoryMerging; - this.repositoryIds = new HashSet<>(); + this.repositoryIds = new HashSet<>( original.repositoryIds ); this.modelPool = original.modelPool; } diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java index 993d38e350..f23bfe4ef8 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java @@ -103,7 +103,7 @@ class DefaultModelResolver this.remoteRepositoryManager = original.remoteRepositoryManager; this.repositories = new ArrayList<>( original.repositories ); this.externalRepositories = original.externalRepositories; - this.repositoryIds = new HashSet<>(); + this.repositoryIds = new HashSet<>( original.repositoryIds ); } @Override