Environment: Gradle <= 2.5, STS <= 3.7 or Eclipse version <= Luna
It is annoying to work with Gradle and Eclipse (or STS) that you have to keep performing "Gradle Refresh" or "Gradle RefreshAll" numerous time in the development workflow.
Here are the scenarios when you MUST perform Gradle Refresh OR remove the projects and "re-import/aka Build Model".
1) You perform Git pull and receive changes to dependencies. Many times the changes coming in are compile time dependencies or testRuntime
dependencies.
In these cases you are confronted with nasty compilation errors. Which are gone ONLY after you perform "Gradle Refresh All/Gradle Refresh Dependency".
2) You add new dependencies yourself to your build.gradle during development and you need your code to
3) JAXB Plugins for schema compilation - Gradle JAXB Plugin- when used you must call xjc before the source folders are created. I got some help using compileJava.dependsOn xjc
as per here but still leaves far from desired.
If a developer changes the xsd and Java sources that references the JAXB classes that the xjc
would generate.
You now must first call xjc
or compileJava
and then you MUST call Gradle Refresh Sources
by right clicking on the schema project.
Another more than year old thread showing same frustration as me.
- I would like to know if anyone encountered these problems or I am the only one and how hey are dealing with.
- How to capture gradle eclipse events so that necessary action can be can performed ? OR What Gradle task gets invoked by the gradle-eclipse plugin ?