then the maven-metadata.xml in the repository is not checked first in order to find the latest timestamped snapshot. Changing it to:
compile 'com.acme:server:99-SNAPSHOT'
and it works.
Because we have a continuous development process without predefined versions, SNAPSHOT always points to the trunk/head of our development. So not having the number makes sense.
Gradle considers any version with a â-SNAPSHOTâ suffix a changing module. If the version is simply âSNAPSHOTâ you can explicitly tell Gradle that the dependency is changing.
Thanks for that. Very helpful. Can I suggest that you add the text you wrote to the documentation. I think thatâs quite important for people to know and the âchangingâ flag isnât clearly documented (that I found) outside the Javadoc for gradle.
Iâm still not sure if this is a bug. Should the hyphen be part of the check that this is a snapshot or just the word âSNAPSHOTâ?
There seems to be somewhat of a disconnect between the Maven deployment code and our resolution logic. You donât necessarily have to create discrete versions for your module, you just simply canât use the version âSNAPSHOTâ, youâll have to name it anything else. This in conjunction with changing = true should give you the result youâre looking for.
Well, I named it â99-SNAPSHOTâ which counts as anything else. Thanks for all your help, but I still think this functionality needs to be better documented in gradle. It is all a bit âmagicâ as to why it sometimes works.
Even the âchangingâ flag isnât documented to mean âwill look for timestamped pom versionsâ. Rather, its documentation seems to suggest that the functionality is only âcheck for new versions often and donât rely on the cacheâ.
This is correct. Timestamped versions are specific to âSNAPSHOTâ versions in Maven repositories. The notion of a âchangingâ module is repository agnostic.
Iâm beginning to think this might actually be an issue with Maven. The code I linked to above seems to indicate that a version of âSNAPSHOTâ is not valid, however Maven is perfectly content with publishing such a module and will use the timestamp name scheme as with other snapshots. In any case Iâve raised GRADLE-3350 to track this as we should probably handle this case better.