Search code examples
groovyintellij-ideagrails-plugin

Intellij IDEA Settings for Grails Plugin Dependency Errors


I'm currently using Intellij IDEA 11.1.4 and though I've seen a few posts regarding issues with Grails plug-ins dependencies, I haven't been able to solve the problem locally. It seems as though Intellij doesn't recognize the plugins as relative to the project module.

For instance all dependencies.groovy files under plug-ins are showing errors for Unresolved Reference Access. However, the main project doesn't seem to have this issue.

Is there any specific build requirement needed for Intellij to recognize Grails-app plugins?

I've attempted running grails clean, re-building the project from scratch, and still the error persists ...

Grails-Plug-in App Dependency Error


Solution

  • Okay ... After hours of searching I figured out this 'issue' by complete accident. The invalid references are not related to grails dependency errors per-se but a are actually references to Groovy Dynamic Properties not being set for the Grails plug-ins that Intellij IDEA needs to relate Groovy DSL Expressions. Basically my problem was a lack of understanding about Intellij's support for DSL languages.

    The solution was to simply add the dynamic properties by selecting ALT+ENTER at the method or property and to invoke the 'Add Dynamic Property' dialogue.

    enter image description here

    Once added the reference errors disappeared.