Package io.quarkus.registry.client.maven
Class MavenRegistryArtifactResolverWithCleanup
- java.lang.Object
-
- io.quarkus.registry.client.maven.MavenRegistryArtifactResolverWithCleanup
-
- All Implemented Interfaces:
MavenRegistryArtifactResolver
public class MavenRegistryArtifactResolverWithCleanup extends Object implements MavenRegistryArtifactResolver
-
-
Constructor Summary
Constructors Constructor Description MavenRegistryArtifactResolverWithCleanup(MavenArtifactResolver resolver, boolean cleanupOldTimestampedVersions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PathfindArtifactDirectory(org.eclipse.aether.artifact.Artifact artifact)StringgetLatestVersionFromRange(org.eclipse.aether.artifact.Artifact artifact, String versionRange)protected static org.eclipse.aether.resolution.ArtifactResultresolveAndCleanupOldTimestampedVersions(MavenArtifactResolver resolver, org.eclipse.aether.artifact.Artifact artifact, boolean cleanupOldTimestampedVersions)This method resolves an artifact and then will attempt to remove old timestamped SNAPSHOT versions.org.eclipse.aether.resolution.ArtifactResultresolveArtifact(org.eclipse.aether.artifact.Artifact artifact)org.apache.maven.artifact.repository.metadata.MetadataresolveMetadata(org.eclipse.aether.resolution.ArtifactResult result)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.registry.client.maven.MavenRegistryArtifactResolver
resolve
-
-
-
-
Constructor Detail
-
MavenRegistryArtifactResolverWithCleanup
public MavenRegistryArtifactResolverWithCleanup(MavenArtifactResolver resolver, boolean cleanupOldTimestampedVersions)
-
-
Method Detail
-
resolveArtifact
public org.eclipse.aether.resolution.ArtifactResult resolveArtifact(org.eclipse.aether.artifact.Artifact artifact) throws BootstrapMavenException- Specified by:
resolveArtifactin interfaceMavenRegistryArtifactResolver- Throws:
BootstrapMavenException
-
findArtifactDirectory
public Path findArtifactDirectory(org.eclipse.aether.artifact.Artifact artifact) throws BootstrapMavenException
- Specified by:
findArtifactDirectoryin interfaceMavenRegistryArtifactResolver- Throws:
BootstrapMavenException
-
getLatestVersionFromRange
public String getLatestVersionFromRange(org.eclipse.aether.artifact.Artifact artifact, String versionRange) throws BootstrapMavenException
- Specified by:
getLatestVersionFromRangein interfaceMavenRegistryArtifactResolver- Throws:
BootstrapMavenException
-
resolveAndCleanupOldTimestampedVersions
protected static org.eclipse.aether.resolution.ArtifactResult resolveAndCleanupOldTimestampedVersions(MavenArtifactResolver resolver, org.eclipse.aether.artifact.Artifact artifact, boolean cleanupOldTimestampedVersions) throws BootstrapMavenException
This method resolves an artifact and then will attempt to remove old timestamped SNAPSHOT versions.IMPORTANT: it does not remove all the timestamped SNAPSHOT versions because otherwise, the artifacts will always be resolved from a remote repository even if the update policy does not require that.
- Parameters:
resolver- Maven artifact resolverartifact- artifact to resolvecleanupOldTimestampedVersions- whether to remove old timestamped SNAPSHOT versions- Returns:
- artifact resolution result
- Throws:
BootstrapMavenException- in case the artifact could not be resolved
-
resolveMetadata
public org.apache.maven.artifact.repository.metadata.Metadata resolveMetadata(org.eclipse.aether.resolution.ArtifactResult result) throws BootstrapMavenException- Specified by:
resolveMetadatain interfaceMavenRegistryArtifactResolver- Throws:
BootstrapMavenException
-
-