This is an automated email from the ASF dual-hosted git repository.

cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 9596255cbf [MNG-7959] User controlled relocations Addendum (#1350)
9596255cbf is described below

commit 9596255cbfd90f5f2dba34efa5d132c4ed256cde
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Mon Dec 18 13:26:49 2023 +0100

    [MNG-7959] User controlled relocations Addendum (#1350)
    
    Name the things.
    
    ---
    
    https://issues.apache.org/jira/browse/MNG-7959
---
 .../maven/repository/internal/MavenArtifactRelocationSource.java       | 2 ++
 .../relocation/DistributionManagementArtifactRelocationSource.java     | 3 ++-
 .../internal/relocation/UserPropertiesArtifactRelocationSource.java    | 3 ++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenArtifactRelocationSource.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenArtifactRelocationSource.java
index be4490248f..5cad9c366d 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenArtifactRelocationSource.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenArtifactRelocationSource.java
@@ -26,6 +26,8 @@ import org.eclipse.aether.resolution.ArtifactDescriptorResult;
 
 /**
  * Maven relocation source.
+ * Note: implementations of this component should avoid the "default" name 
(has special meaning in Eclipse Sisu) and
+ * explicitly order implementations using Sisu priorities.
  *
  * @since 4.0.0
  */
diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/DistributionManagementArtifactRelocationSource.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/DistributionManagementArtifactRelocationSource.java
index c68e7a2c11..80a8a0ad62 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/DistributionManagementArtifactRelocationSource.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/DistributionManagementArtifactRelocationSource.java
@@ -42,10 +42,11 @@ import org.slf4j.LoggerFactory;
  * @since 4.0.0
  */
 @Singleton
-@Named
+@Named(DistributionManagementArtifactRelocationSource.NAME)
 @Priority(5)
 @SuppressWarnings("checkstyle:MagicNumber")
 public final class DistributionManagementArtifactRelocationSource implements 
MavenArtifactRelocationSource {
+    public static final String NAME = "distributionManagement";
     private static final Logger LOGGER = 
LoggerFactory.getLogger(DistributionManagementArtifactRelocationSource.class);
 
     @Override
diff --git 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/UserPropertiesArtifactRelocationSource.java
 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/UserPropertiesArtifactRelocationSource.java
index 0ea2497e09..70ae05c7db 100644
--- 
a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/UserPropertiesArtifactRelocationSource.java
+++ 
b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/relocation/UserPropertiesArtifactRelocationSource.java
@@ -46,10 +46,11 @@ import org.slf4j.LoggerFactory;
  * @since 4.0.0
  */
 @Singleton
-@Named
+@Named(UserPropertiesArtifactRelocationSource.NAME)
 @Priority(50)
 @SuppressWarnings("checkstyle:MagicNumber")
 public final class UserPropertiesArtifactRelocationSource implements 
MavenArtifactRelocationSource {
+    public static final String NAME = "userProperties";
     private static final Logger LOGGER = 
LoggerFactory.getLogger(UserPropertiesArtifactRelocationSource.class);
 
     private static final String CONFIG_PROP_RELOCATIONS_ENTRIES = 
"maven.relocations.entries";

Reply via email to