We are trying to build a SNAPSHOT of a project which is also a dependency to other projects. Objective it is get updated SNAPSHOTS of dependencies. After lot of attempts, still not able to get what we wanted.
When
version = 'SNAPSHOT'
//publishes to Artifactory as ReferenceDataClient-SNAPSHOT.jar
configuration.all doesn’t fetches the new versions.
Could not resolve all dependencies for configuration ':Flows-Core:compile'.
> Could not find com.xxx:ReferenceDataClient:1234-SNAPSHOT.
Required by:
com.xxx.flow:Flows-Core:1234-SNAPSHOT
Please let us know if SNAPSHOT configuration requires anymore setting.
I had this problem. What I did was configure the Artifactory repository to not give unique names to snapshot files. I’m not sure how to solve the problem with unique snapshot file names (probably if I were using the maven POMs on the artifactory server correctly this would work right, but I’m not).
I don’t know, I haven’t tried doing an update to one of my SNAPSHOT files in artifactory yet. It should though, as gradle checks the checksum if I remember correctly. Also you can force gradle to redownload dependencies in the worst case.
Publishing and consuming snapshots doesn’t require any special settings. The fact that the published version contains a timestamp is expected, and the consumer doesn’t have to care. By default, consumers wiill check for new snapshots every 24 hours. To reduce this timespan, you can either run with ‘–refresh-dependencies’, or configure ‘resolutionStrategy.cacheChangingVersionsFor’ (not ‘cacheDynamicVersionsFor’).
That’s easily possible. If ‘pom.xml’ or ‘maven-metadata.xml’ is missing, you can’t expect much. Both of these files are generated and published automatically by Maven and Gradle.