Gradle cannot find time-stamped snapshot dependencies in maven repository

(Jeroen Lankheet) #1

I have configured several Nexus managed maven repositories for dependency resolving. I’m building and using snapshots and also need stuff from the 3rd party repository. Now when doing a build --info, I see that Gradle is trying to resolve artifacts directly without reading the maven-metadata.xml from Nexus. It does that only for the snapshot repository. It does try to resolve the artifacts through maven-metadata.xml from the 3rd party repository, but fails, as expected. The result is that it is not dealing with the snapshots in the proper way (timestamped). Gradle can’t find the artifact with the URL because it is assembling a complete artifact URL without a timestamp. The versions I’m interested in are of the format ‘1.0_V54+’ So any version greater than this version is okay. On I have put a log, the meta data and part of the build file as comment

What should be done for this snapshot repository so that it reads the repository via the maven-metadata.xml?

(Jeroen Lankheet) #2

Shining a little light on the issue myself… It turns out that our version number 1.0_V54.1234-SNAPSHOT (which is stored by Nexus as 1.0_V54.1234.20130909.120434-1.jar) cannot be resolved by the version string ‘1.0_V54+’. The 1234 is the SVN revision.

It turns out that combining SVN revisions with snapshots is not such a good idea. Anyone got experience with this? I will remove the SVN revision from my snapshot version number schema.