--refresh-dependencies ignores updated poms

After updating some POMs in my local repo, gradle ingores the changes, even with the --refresh-dependencies switch.

This might be due to the fact that the repo was not marked as “changing”, but I wish there was an option to force gradle to use the correct dependencies, irrelevant of the state of the local cache. I could only get it to work after wiping my entire .gradle/ dir and starting over.

What do you mean with “your local repo”. Do you mean on your disk or in your own repository manager? --refresh-dependencies should lookup all dependencies, regardless if a dep was marked as changing or not.

cheers, René

Sorry, the updated POMS were coming from a private maven repo running on a separate server.

There is another related issue with this. I can also reproduce a case when using ‘–refresh-dependencies’ works correctly, finds the new POM and build fails (as expected because the new POM had unresolved deps).

Then, if you run gradle again, this time without --refresh-dependencies, it defaults back to the original POM and the build works. After the dependencies are refreshed, they should replace the old ones.

I found deleting the metadata in ./caches/modules-2/metadata-2.1/descriptors/org.package/module solves the 2nd bug …