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.jarthen 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.
listeners, log, repository, repositorySession
Constructor and Description |
---|
CleanupReleasedSnapshotsRepositoryPurge(ManagedRepositoryContent repository,
MetadataTools metadataTools,
RepositoryRegistry repositoryRegistry,
RepositorySession repositorySession,
List<RepositoryListener> listeners) |
Modifier and Type | Method and Description |
---|---|
void |
process(String path)
Perform checking on artifact for repository purge
|
purge
public CleanupReleasedSnapshotsRepositoryPurge(ManagedRepositoryContent repository, MetadataTools metadataTools, RepositoryRegistry repositoryRegistry, RepositorySession repositorySession, List<RepositoryListener> listeners)
public void process(String path) throws RepositoryPurgeException
RepositoryPurge
path
- path to the scanned artifactRepositoryPurgeException
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.