I have a Gradle project (imported and generated using Eclipse Gradle) in the Spring Tool Suite Eclipse version (3.2.0). It works most of the time, but sometimes dependencies get out of sync between the Gradle Dependencies and the Web Application Libraries in the project. Here is what I mean:
I define the compilation dependency as follows:
compile(group: 'com.mygroup', name: 'myClient', version: '0.2.1')
Then, after I do "Gradle -> Update All", I see that the lib dependency "myClient-0.2.1.jar" is in the "Gradle Dependencies" list, and in the list under "Web Application Libraries".
Now, after a while, I decided to use a newer version of this library:
compile(group: 'com.mygroup', name: 'myClient', version: '0.2.2')
I do "Gradle β Refresh All" again, I also tried to update the project, rebuild it, open / close the project and Eclipse, but I see:
The dependency in the "Gradle" dependencies is indeed updated and displayed as "myClient-0.2.2.jar". But the dependency in the "Web Application Libraries" refuses to be updated and remains "myClient-0.2.1.jar". this obviously destroys the chaos for my application, since now my code does not reference the correct new classes and displays all the red ones in Eclipse.
One way that sometimes works is to destroy the whole project and rebuild it from scratch, but this is more radical than what I would like to do :) And sometimes it doesnβt work. It seems that I can not explicitly control what is included in the "Web Application Libraries", so although I see that the wrong library is listed in Project -> Properties -> Java Build Path -> Libraries -> Web Application Libraries - I can not change it there.
Any understanding of this would be greatly appreciated, Thank you! Marina