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
ConstructorsConstructorDescriptionMavenRegistryArtifactResolverWithCleanup(io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver resolver, boolean cleanupOldTimestampedVersions) -
Method Summary
Modifier and TypeMethodDescriptionfindArtifactDirectory(org.eclipse.aether.artifact.Artifact artifact) getLatestVersionFromRange(org.eclipse.aether.artifact.Artifact artifact, String versionRange) protected static org.eclipse.aether.resolution.ArtifactResultresolveAndCleanupOldTimestampedVersions(io.quarkus.bootstrap.resolver.maven.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, waitMethods inherited from interface io.quarkus.registry.client.maven.MavenRegistryArtifactResolver
resolve
-
Constructor Details
-
MavenRegistryArtifactResolverWithCleanup
public MavenRegistryArtifactResolverWithCleanup(io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver resolver, boolean cleanupOldTimestampedVersions)
-
-
Method Details
-
resolveArtifact
public org.eclipse.aether.resolution.ArtifactResult resolveArtifact(org.eclipse.aether.artifact.Artifact artifact) throws io.quarkus.bootstrap.resolver.maven.BootstrapMavenException - Specified by:
resolveArtifactin interfaceMavenRegistryArtifactResolver- Throws:
io.quarkus.bootstrap.resolver.maven.BootstrapMavenException
-
findArtifactDirectory
public Path findArtifactDirectory(org.eclipse.aether.artifact.Artifact artifact) throws io.quarkus.bootstrap.resolver.maven.BootstrapMavenException - Specified by:
findArtifactDirectoryin interfaceMavenRegistryArtifactResolver- Throws:
io.quarkus.bootstrap.resolver.maven.BootstrapMavenException
-
getLatestVersionFromRange
public String getLatestVersionFromRange(org.eclipse.aether.artifact.Artifact artifact, String versionRange) throws io.quarkus.bootstrap.resolver.maven.BootstrapMavenException - Specified by:
getLatestVersionFromRangein interfaceMavenRegistryArtifactResolver- Throws:
io.quarkus.bootstrap.resolver.maven.BootstrapMavenException
-
resolveAndCleanupOldTimestampedVersions
protected static org.eclipse.aether.resolution.ArtifactResult resolveAndCleanupOldTimestampedVersions(io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver resolver, org.eclipse.aether.artifact.Artifact artifact, boolean cleanupOldTimestampedVersions) throws io.quarkus.bootstrap.resolver.maven.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:
io.quarkus.bootstrap.resolver.maven.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 io.quarkus.bootstrap.resolver.maven.BootstrapMavenException - Specified by:
resolveMetadatain interfaceMavenRegistryArtifactResolver- Throws:
io.quarkus.bootstrap.resolver.maven.BootstrapMavenException
-