When you request a snapshot artifact, the most recent snapshot is obtained. Maven examines the associated metadata in the repository to determine the correct copy to download. The Maven Repository Manager maintains each copy with a unique timestamp and build number. For example, the contents of the repository directory for an artifact should look similar to the following: You can directly request a specific snapshot of your requirement by referencing timestamp and build numbers in your version, for example, 2.
Usually, only the latest snapshot is required for proper operation of continuous integration builds. Retention of older instances of a snapshot is helpful for troubleshooting purposes when the continuous integration server indicates that a snapshot dependency change has broken the integration process.
It is sometimes useful to pull slightly older builds from the repository, after the last working build, to identify the problem. If no recurring cleanup operation occurs, snapshot instances can accumulate quite rapidly over the lifetime of a project.
To keep storage requirements of the repository manager under control, delete older snapshots. Set options regarding retention policy according to available storage and performance requirements.
Each of these builds, at least the successful ones, results in some artifacts being published into the repository. These can start consuming a lot of space, and it is important to manage them.
Archiva provides two different options for automatically cleaning up old snapshots on a per-repository basis: Repository Purge by Number of Days Older Archiva automatically deletes snapshots older than the specified number of days. Archiva always retains the most recent snapshot, no matter how old it is. Repository Purge by Retention Count To use this method, you must set the purge-by-days-older value to 0. Archiva retains only the most recent snapshot instances up to this value.
Older instances that exceed this count are deleted. Not only does this save space, but it also ensures that your dependency references are up-to-date. Any existing continuous integration builds that refer to the snapshot fail with a missing dependency message after the dependency is deleted from the repository manager.
This failure reminds you that a dependency reference is stale and encourages you to fix the problem. To use Archiva's authentication and role management system with your organization's existing user management system, you must provide additional configuration with Redback. Redback has limited support for LDAP and other authentication systems.
Complete details are available in the following location: The choice of backup solutions may be affected by your failover method.
Depending on your preference, you can either set up an identically configured backup system with a separate file system that is synchronized with the primary systems or configure both systems to use the same shared file system.
For more information, see the Archiva page: