Eclipse Java Errors on gradle project even though Gradle can build project


(Steve Cohen) #1

Continuing the discussion from Eclipse pulls in untwanted 2.4.4 version of Groovy causing error:

Now I am able to build my plugin collection in Eclipse. I can even install it into my local Maven repository. But now I want to USE this plugin to build another project in Eclipse. And in fact, I CAN build it in Eclipse (as well as not in Eclipse), However, the background compile task shows a number of errors because it can’t find my java dependencies (even though running Gradle these dependencies are found without difficulty and compilation succeeds). So why would this be?

Here is a potential clue. When I run the menu option Gradle->Refresh Gradle Project, I get this:

vt.platformwar.rpm is the id of one of the plugins in my plugin package, and as I’ve said, I installed this plugin package to my maven repo. Gradle can build with this info - even in Eclipse. But for some reason, this plugin is not making it onto the Eclipse classpath.

I even copied the following entry into my .classpath file, it did no good.
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>

As seen below, this just created an empty container and Eclipse still does not know about my gradle dependencies:

How can I make this work