grails spring-security-core plugin does not make under intellij idea 9/10
I've been playing with the grails framework lately with idea and everything has gone well until I stalled the spring-security-core g开发者_运维问答rails plugin. The plugin and project work fine when using grails compile/run-app/etc, however intellij idea (9) is no longer able to "make" the project, giving me an errors:
Steps:
- grails create-app my-app grails
- install-plugin spring-security-core
- import my-app as a grails project
- click make
This produces errors similar to the following...
$HOME\.grails\1.3.6\projects\macs\plugins\spring-security-core-1.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\IpAddressFilter.java
cannot find symbol variable ReflectionUtils
This error is repeated for several java class files that reference the ReflectionUtils groovy class file org.codehaus.groovy.grails.plugins.springsecurity.ReflectionUtils which is in the same package, but found in the spring-security-core/src/groovy directory (as opposed to spring-security-core/src/java)
The IDE source parser seems to resolve things correctly, as there are no red marks littering the file, and the navigation finds the files correctly, but the "project make" is listing these references to this groovy class from java classes as "can not find symbol" errors.
Does anyone have any advice on how to get the idea IDE to make the project without the errant errors?
I tried changing the order of the plugin sources, and moving to idea 10, but these made no difference, and I can't think of anything else to try.
After removing, re-adding, and then rebuilding my grails application, it seems to build correctly now.
If have several project using spring-security-core having no issues upon 'make' with IntelliJ. I assume your project settings are not 100% ok.
Looks like spring-security-core/src/groovy is not listed as a source folder. Speaking of IntelliJ 10, open 'File | Project Structure', 'Modules' on the left, -grailsPlugins in the middle. On the right, go down until you see the spring-security-core plugin and add src/groovy to the list of source folders by marking it blue.
See the screenshot:
精彩评论