I’m new to Grails development and would like to set up a new project, so I can use Eclipse as IDE and build it on my CI (Jenkins) with Maven. This is my environment:
- Java 1.6.0
- Grails 2.1.0
- Maven 2.2.1
- Eclipse Juno with the m2e and egit plugins
I used the following commands from
http://grails.org/doc/latest/guide/commandLine.html#antAndMaven:
mvn archetype:generate -DarchetypeGroupId=org.grails \
-DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=2.1.0 \
-DgroupId=com.company.dep -DartifactId=project
mvn initialize
But after importing it as a maven project in Eclipse, there were erros about slf4j and com.sun.tools not found and lifecycle phases not mapped.
What steps are necessary to get this running in Eclipse?
Plugins, Plugins, Plugins… you can add the maven plugin / Grails plugin for eclipse and just build a new project.
Select the option to create a maven project (it will auto generate the pom files for you) then you can add Grails to it…
Similarly you can start a new grails project and then add maven to it. It will download all the dependencies automatically.
Most plugins are free to download from : http://marketplace.eclipse.org