HowTo run Grails1.1 + Acegi + IntelliJ IDEA
Example:
create new grails application with IntelliJ IDEA
create file testapp/grails-app/conf/BuildConfig.groovy containing
grails.project.plugins.dir=”./plugins”
install acegi security plugin (from shell)
>grails install-plugin acegi
>grails create-auth-domains User Role Requestmap
>grails generate-manager
>grails generate-registration
check that your intelliJ project file /grails-app/ProjectName.iml contains the following lines
...
<component name="NewModuleRootManager" inherit-compiler-output="true"<exclude-output />
<content url="file://$MODULE_DIR$">
...
<sourceFolder url="file://$MODULE_DIR$/plugins/acegi-0.5.1/grails-app/conf" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/plugins/acegi-0.5.1/grails-app/controllers" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/plugins/acegi-0.5.1/grails-app/services" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/plugins/acegi-0.5.1/grails-app/taglib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/plugins/acegi-0.5.1/src/groovy" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/plugins/acegi-0.5.1/src/java" isTestSource="false" />
...
<orderEntry type="module-library">
<library name="Grails User Library">
<CLASSES>
<root url="file://$MODULE_DIR$/lib" />
<root url="file://$MODULE_DIR$/plugins/acegi-0.5.1/lib" />
...
</CLASSES>
<JAVADOC />
<SOURCES />
...
<jarDirectory url="file://$MODULE_DIR$/plugins/acegi-0.5.1/lib" recursive="false" />
If you get “cannot find symbol class AuthenticateService in LoginController.java” while compiling try to add the following lines to SecurityEventListener.java
package…
import org.grails.plugins.springsecurity.service.AuthenticateService;
public class
this solution works for me until jetbrain will fix the problem in the next 8.1.1 EAP
(see http://www.jetbrains.net/devnet/message/5233749)
Tags: grails
Kommentar verfassen