Need help with dependency version

In our microservices’ build.gradle files we have the following dependency

implementation "com.domain.some-service:some-service:+"

Someone locally built some-service:111.111.111 and pushed it to our Maven repo. However we’ve subsequently removed that version in our repo, and cleared all our local caches with that version. However, Gradle is still looking for that version, in spite of using --refresh-dependencies in the build. How can I make Gradle forget about that version, and get the latest version from our repo? Do I have to remove ALL of the com.domain.service files from the repo and rebuild it? Thanks!

The question is where Gradle gets this information from and whether you properly deleted it.
Maybe you just deleted the version artifacts but still have it listed in the maven-metadata.xml file that is used to resolve such version ranges.

Otherwise maybe it might help to use --info or --debug to get further information where the information is coming from.

To make super sure, you can also do a fresh worktree and use a custom GRADLE_USER_HOME. If then still 111.111.111 is searched for, you know it is on server side.

1 Like

Yes, I realize now that’s how it works. I deleted the maven-metadata*.xml files, rebuilt the service, and voila, all is well. Thanks!

1 Like