How do I force my Maven snapshots to resolve latest by timestamp rather than revision?

JFrog Support
2018-05-29 06:02

Using the SNAPSHOT keyword to resolve the most recent version will use the latest revision over the timestamp. Here's how to force it to use timestamp instead for indexing.

Affected Version – Property exists in 3.7.0 and above

Description – relevant logs, short details
Maven/Ivy/Gradle repositories resolve latest according to the latest revision and not according to timestamp:

libs-snapshot-local/com/jfrog/myapp/1.2.0-SNAPSHOT/myapp-1.2.0-20180205.0622184.jar <—- timestamp is greater
libs-snapshot-local/com/jfrog/myapp/1.2.0-SNAPSHOT/myapp-1.2.0-20180205.0524425.jar <—- this one resolves as latest because of revision number

This can happen if you have two different CI servers submitting the same job from different locations to the same repository or to aggregates of a virtual repository.

Resolution – Steps, describe a solution
If you want to resolve according to the time stamp, you can replace/add the following system property to your file: 


You will need to restart Artifactory for the property to take affect.