We are building some internal libraries to upload them to our company’s nexus.
Libraries are successfully uploaded: I can find the timestamp of the latest upload in the nexus webfrontend. I also can download and verify them manually: it works.
Now another gradle project uses that nexus to resolve the dependency. But now I am again in a situation: it fails almost always to resolve the new version of the snapshot library. It simply compiles with the old and obsolete version of the snapshot.
We are using Eclipse Oxygen with Buildship under Windows as well as under Ubuntu.
Even using the command line gradlew does not fix this issue.
We tried all combinations of
task ‘clean’ followed by task 'builld’
task 'eclipse’
gradlew --stop
gradlew cleanEclipseClasspath eclipse
gradlew --refresh-dependencies
kill the several gradle processes manually and start a 'build’
task ‘cleanEclipse’ followed by task 'eclipse’
restart eclipse
refresh the gradle project in Eclipse
followed by
gradlew build
or
gradlew war
or
gradlew compile
(BTW: Here some other issues are some kind of uncomfortable. For example: ‘gradlew cleaneclipse eclipse’ removes the ‘Gradle nature’ of the project. Calling this tasks from Eclipse makes the project remove itself from being displayd in the gradle tasks.)
Changing the dependency to a version-token, that does not exist in the Nexus makes Gradle fail as expected. Changing back to the existing version, still takes the old obsolete version of the library.
Uploading a new version-token of the snapshot and changing the second project to the new snapshot version-token also works. But as you might guess, that is not our intention.
How can I force Gradle to resolve the most current version of the dependencies of the artifact repo?
Or how can I force Gradle to not use obsolete snapshots any more?