Class UserPropertiesArtifactRelocationSource

java.lang.Object
org.apache.maven.internal.impl.resolver.relocation.UserPropertiesArtifactRelocationSource
All Implemented Interfaces:
MavenArtifactRelocationSource

@Singleton @Named("userProperties") @Priority(50) public final class UserPropertiesArtifactRelocationSource extends Object implements MavenArtifactRelocationSource
Relocation source from user properties.
Since:
4.0.0
  • Field Details

    • NAME

      public static final String NAME
      See Also:
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • SENTINEL

      private static final org.eclipse.aether.artifact.Artifact SENTINEL
  • 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: MavenArtifactRelocationSource
      Returns Artifact instance where to relocate to, or null.
      Specified by:
      relocatedTarget in interface MavenArtifactRelocationSource
      Parameters:
      session - The session, never null.
      artifactDescriptorResult - The artifact descriptor result, never null.
      model - The artifact model, never null.
      Returns:
      The Artifact to relocate to, or null if no relocation wanted.
      Throws:
      org.eclipse.aether.resolution.ArtifactDescriptorException
    • isProjectContext

      private boolean isProjectContext(String context)
    • isAny

      private static boolean isAny(String str)
    • matches

      private static boolean matches(String pattern, String str)
    • artifactPredicate

      private static Predicate<org.eclipse.aether.artifact.Artifact> artifactPredicate(org.eclipse.aether.artifact.Artifact artifact)
    • parseRelocations

      private UserPropertiesArtifactRelocationSource.Relocations parseRelocations(org.eclipse.aether.RepositorySystemSession session)
    • parseArtifact

      private static org.eclipse.aether.artifact.Artifact parseArtifact(String coords)