Class UserPropertiesArtifactRelocationSource
- java.lang.Object
-
- org.apache.maven.repository.internal.relocation.UserPropertiesArtifactRelocationSource
-
- All Implemented Interfaces:
MavenArtifactRelocationSource
@Singleton @Named("userProperties") @Priority(50) public final class UserPropertiesArtifactRelocationSource extends java.lang.Object implements MavenArtifactRelocationSourceUser controlled relocations. This property is a comma separated list of entries with the syntaxGAV>GAV. The firstGAVcan contain*for any elem (so*:*:*would mean ALL, something you don't want). The secondGAVis either fully specified, or also can contain*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right handGAVis absent (line looks likeGAV>), the left hand matchingGAVis banned fully (from resolving).
Note: the>means project level, while>>means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,maven.relocations.entries = org.foo:*:*>, \\
means: 3 entries, ban
org.here:*:*>org.there:*:*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5org.foo group(exactly, soorg.foo.baris allowed), relocateorg.heretoorg.thereand finally globally relocate (see>>above)javax.inject:javax.inject:1tojakarta.inject:jakarta.inject:1.0.5.- Since:
- 3.10.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME
-
Constructor Summary
Constructors Constructor Description UserPropertiesArtifactRelocationSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.aether.artifact.ArtifactrelocatedTarget(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.resolution.ArtifactDescriptorResult artifactDescriptorResult, org.apache.maven.model.Model model)ReturnsArtifactinstance where to relocate to, ornull.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
relocatedTarget
public org.eclipse.aether.artifact.Artifact relocatedTarget(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.resolution.ArtifactDescriptorResult artifactDescriptorResult, org.apache.maven.model.Model model) throws org.eclipse.aether.resolution.ArtifactDescriptorExceptionDescription copied from interface:MavenArtifactRelocationSourceReturnsArtifactinstance where to relocate to, ornull.- Specified by:
relocatedTargetin interfaceMavenArtifactRelocationSource- Parameters:
session- The session, nevernull.artifactDescriptorResult- The artifact descriptor result, nevernull.model- The artifact model, nevernull.- Returns:
- The
Artifactto relocate to, ornullif no relocation wanted. - Throws:
org.eclipse.aether.resolution.ArtifactDescriptorException
-
-