org.apache.archiva.consumers.core.repository
Class CleanupReleasedSnapshotsRepositoryPurge
java.lang.Object
org.apache.archiva.consumers.core.repository.AbstractRepositoryPurge
org.apache.archiva.consumers.core.repository.CleanupReleasedSnapshotsRepositoryPurge
- All Implemented Interfaces:
- RepositoryPurge
public class CleanupReleasedSnapshotsRepositoryPurge
- extends AbstractRepositoryPurge
This will look in a single managed repository, and purge any snapshots that are present
that have a corresponding released version on the same repository.
So, if you have the following (presented in the m2/default layout form) ...
/com/foo/foo-tool/1.0-SNAPSHOT/foo-tool-1.0-SNAPSHOT.jar
/com/foo/foo-tool/1.1-SNAPSHOT/foo-tool-1.1-SNAPSHOT.jar
/com/foo/foo-tool/1.2.1-SNAPSHOT/foo-tool-1.2.1-SNAPSHOT.jar
/com/foo/foo-tool/1.2.1/foo-tool-1.2.1.jar
/com/foo/foo-tool/2.0-SNAPSHOT/foo-tool-2.0-SNAPSHOT.jar
/com/foo/foo-tool/2.0/foo-tool-2.0.jar
/com/foo/foo-tool/2.1-SNAPSHOT/foo-tool-2.1-SNAPSHOT.jar
then the current highest ranked released (non-snapshot) version is 2.0, which means
the snapshots from 1.0-SNAPSHOT, 1.1-SNAPSHOT, 1.2.1-SNAPSHOT, and 2.0-SNAPSHOT can
be purged. Leaving 2.1-SNAPSHOT in alone.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
metadataTools
private MetadataTools metadataTools
managedRepositoryAdmin
private ManagedRepositoryAdmin managedRepositoryAdmin
repoContentFactory
private RepositoryContentFactory repoContentFactory
CleanupReleasedSnapshotsRepositoryPurge
public CleanupReleasedSnapshotsRepositoryPurge(ManagedRepositoryContent repository,
MetadataTools metadataTools,
ManagedRepositoryAdmin managedRepositoryAdmin,
RepositoryContentFactory repoContentFactory,
RepositorySession repositorySession,
List<RepositoryListener> listeners)
process
public void process(String path)
throws RepositoryPurgeException
- Description copied from interface:
RepositoryPurge
- Perform checking on artifact for repository purge
- Parameters:
path
- path to the scanned artifact
- Throws:
RepositoryPurgeException
updateMetadata
private void updateMetadata(ArtifactReference artifact)
Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.