How can i get the snapshot timestamp of an artifact from nexus , in my build.gradle dependencies

I want to get a dependency from nexus which is uploaded in SNAPHOT version , so in my build.gradle i can not get the timestamp to have my last version uploaded.
Any idea ???

Thank you

1 Like

From your message, I think you’re saying the issue is just that you’re not downloading the most recent SNAPSHOT version that you expect. The title indicates a different ask.

A SNAPSHOT version is classified as a “changing” version. Changing versions are resolved and cached once every 24 hours. If you always want the latest SNAPSHOT from Nexus, you can force changing versions to be cached for less time. For example, to never cache:

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'

This will increase network requests though. Consider if there’s some amount of time that is reasonable. For example, if it takes 2 minutes to build and publish a new SNAPSHOT, it may be reasonable to set this to 2 minutes.


yes this is what i did and it resolved my problem , thank you :slight_smile: