Dec 5th, 2012, 11:26 AM
No completion in imported Maven Groovy jar project in STS 3.1.0?
We've got a multimodule Maven project that was all Java, imported into STS 3.1.0 just fine. Now, we're adding another module, but this one is a Groovy (not Grails) project that builds a jar. We build via Maven & the groovy-eclipse-compiler just fine. Now, I'm trying to import the project into STS.
Before importing, I installed all of the Groovy (but not Grails) tooling and restarted.
I imported via File\Import\Existing Maven Projects. Went through standard import, wizard warned me about missing m2e connectors, I ignored (as usual), and the project imported ok. Groovy files (in src/main/java, btw) have Groovy file icons and correct syntax highlighting, but there is absolutely no auto-completion for anything, including imports, the "this" reference, or variables declared with a specific type instead of "def", etc.
There is also no Groovy menu option when right-clicking on the project node in the Package Explorer, and I don't see any grooviness anywhere else in the project settings or properties.
What do I have to do to get completion working in groovy files?
Dec 6th, 2012, 10:07 AM
You need to undo the ignoring of the groovy compiler plugin. And you need to install the groovy-eclipse configurator for m2e. You can get that from the groovy-eclipse update site. It is also available on the dashboard. This will enable Eclipse to properly recognize and configure your maven projects that use groovy.
Dec 6th, 2012, 10:54 PM
That was it. Thanks, Andrew!
Tags for this Thread