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 Object
implements MavenArtifactRelocationSource
User controlled relocations.
This property is a comma separated list of entries with the syntax
Note: the
For example,
GAV>GAV.
The first GAV can contain * for any elem (so *:*:* would mean ALL, something
you don't want). The second GAV is either fully specified, or also can contain *,
then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact.
Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching
GAV is 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.5
org.foo group (exactly, so org.foo.bar is allowed),
relocate org.here to org.there and finally globally relocate (see >> above)
javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5.- Since:
- 3.10.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.aether.artifact.ArtifactrelocatedTarget(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.resolution.ArtifactDescriptorResult artifactDescriptorResult, Model model) ReturnsArtifactinstance where to relocate to, ornull.
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
UserPropertiesArtifactRelocationSource
public UserPropertiesArtifactRelocationSource()
-
-
Method Details
-
relocatedTarget
public org.eclipse.aether.artifact.Artifact relocatedTarget(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.resolution.ArtifactDescriptorResult artifactDescriptorResult, Model model) throws org.eclipse.aether.resolution.ArtifactDescriptorException Description 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
-