I am new to Gradle but I totally like it, except for the Eclipse integration… Before I used Maven and the build/project config was just as with Gradle, easy to get working outside of eclipse but a pain in the ass to make eclipse understand what I want.
I am using Eclipse 4.2 SR1 with Gradle 1.4 on Windows 7. Maybe unrelated but I try to deploy to JBoss AS 7.
I have a root directory in which I have a settings.gradle to include subprojects and a build.gradle to define basic stuff like library versions etc.
Then there are some normal java projects which have dependencies and also a web project. The problem with the web project within eclipse is, that it includes the libraries in WEB-INF/lib even though I used providedCompile for these dependencies. The Gradle build does fine, but Eclipse can’t handle that. Subsequently I have an enterprise archive that should add the previously providedCompile’d jars to EAR/lib which again works fine when building with gradle command line tool but not within eclipse. In Eclipse I get all the dependencies added to the root directory of the EAR and also into the EAR/lib directory.
Anyone already had such problems and could help me with that? The described structure with the gradle files can be found on http://pastebin.com/Y5YhdW8y
Also the question on stackoverflow: http://stackoverflow.com/questions/14916917/gradle-and-eclipse-with-ear-project