Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aether-users] Keeping only most current Snapshot version locally

Hi,

My application is resolving large, snapshot versioned files (>100MB each) from a remote repository.
Since the files are so large, i only want to have the most current version available locally,
but also ensure that the file is only resolved if there is a newer version available remotely.

I currently disable snapshot normalization to avoid having a duplicate artifact named "SNAPSHOT"

    session.setConfigProperty("aether.artifactResolver.snapshotNormalization", false);

But when a new version of the artifact is resolved, the old file still remains in the local repository.

My naive solution to the problem would be to delete old files after an artifact was resolved.
Basically, i would delete all files that are not the new file, its checksum files, a resolver-status.properties,
or an xml file.

But i imagine, there might be an aether solution to this problem.
Maybe it is possible to only have a "SNAPSHOT" file locally and still only resolve files if they are newer.

Thanks
Johannes


--
Johannes Dorn

Codetrails GmbH
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Tel: +49 6151 2767092
http://www.codetrails.com

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940



Back to the top