first question here :)
I have a Grails project (using version 2.5.6) and instead of using grails to generate the war file, like I'm doing now, I need to compile the project with Maven.
I was wondering if anyone here had ever implemented Maven on a Grails project and knew what the steps would be to correctly add all the dependencies.
EDIT
I've already created the pom file and added the grails-maven-plugin. But when I try to run mvn grails:run app
for example, it fails to compile:
|Compiling 174 source files
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] Compile error during compilation with javac.
[groovyc] C:\...\plugins\webflow-2.0.8.1\src\groovy\org\codehaus\groovy\grails\webflow\persistence\FlowAwareCurrentSessionContext.java:18: error: cannot find symbol
[groovyc] import org.hibernate.classic.Session;
[groovyc] ^
[groovyc] symbol: class Session
[groovyc] location: package org.hibernate.classic
[groovyc] C:\...\plugins\webflow-2.0.8.1\src\groovy\org\codehaus\groovy\grails\webflow\persistence\FlowAwareCurrentSessionContext.java:19: error: cannot find symbol
[groovyc] import org.hibernate.engine.SessionFactoryImplementor;
[groovyc] ^
[groovyc] symbol: class SessionFactoryImplementor
[groovyc] location: package org.hibernate.engine
[groovyc] C:\...\plugins\webflow-2.0.8.1\src\groovy\org\codehaus\groovy\grails\webflow\persistence\FlowAwareCurrentSessionContext.java:34: error: cannot access CurrentSessionContext
[groovyc] public class FlowAwareCurrentSessionContext extends SpringSessionContext {
[groovyc] ^
[groovyc] class file for org.hibernate.context.CurrentSessionContext not found...
Both Webflow and Hibernate dependencies are declared in my pom file though:
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>webflow</artifactId>
<version>2.0.8.1</version>
<scope>compile</scope>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>hibernate</artifactId>
<version>2.2.1</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
PD: I'm behind a proxy downloading the dependencies from Nexus.
Thank you!