--refresh-dependencies ignores updated poms


#1

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.


(René Groeschke) #2

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é


#3

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


#4

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.


#5

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