Grails unit tests fail when using spring-security-acl

Hi All,
I've been using IntelliJ for a while, but in a recent project i'm using the spring-security-acl grails plugin. When i run any unit or integration test the IDE fails. Even something as simple as:
class UserControllerTests extends GroovyTestCase {
  void testSomething() {
     //Nothing   
  }
}

The IDE fails with this, even though it runs fine with "run" in the IDE:
C:\Users\mlathe\Documents\IntelliJProjects\myproject\grails-app\domain\org\codehaus\groovy\grails\plugins\springsecurity\acl\AclEntry.groovy
unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity.acl.AclObjectIdentity

The class exists and is in the right place.

One thing to consider. spring-security-acl does something that i think is weird. The code in the plugin depends on classes that are in the current module. That is, that the plugin is not complete and there is a weird dependency circle (ie myproject uses spring-security-acl, but spring-security-acl depends on certain classes being in myproject)

Thanks
--Matthias

1 comment
Comment actions Permalink

Hi Matthias

Which version of Intellij are you using?

After upgrading to 10.0.1, i cannot even compile my grails project with the spring-security-acl plugin. I get errors like:

/Users/andi/Library/Caches/IntelliJIdea10/compiler/livenet.crm.livenet.crm122c8c53/.generated/groovyStubs/livenet.crm122c8c53/livenet.crm-grailsPlugins/production/grails/plugins/springsecurity/acl/AbstractAclObjectIdentity.java
cannot find symbol class AclClass
cannot find symbol class AclObjectIdentity
etc.


Finally I got it running in Intellij 10. Here is what I did:
- quit Intellij 10 and reopen the same project with Intellij 9.0.4 again
- in the Project viewer under "External Libraries" -> "Grails User Library" i deleted the jar file "org.springframework.security.acls-3.0.3.RELEASE.jar" (with "safe delete" disabled)
- then run the grails app. Grails does no reload the required jar files from the web again
- the project starts up without errors
- quit Intellij 9 and reopen the project with version 10
- now run the grails app. It should just start up fine, without the errors.

Probably you can do this all in Intellij 10 as well.

Andi

0

Please sign in to leave a comment.