Maven has this concept of archetypes, which are in simple terms pre-configured or pre-setup projects for different technologies like GWT, Grails, Scala, Wicket etc. So what you are getting is Maven's goodness sprinkled on top of these pre configured project (which prefer a certain structure to things) so you can benefit from Maven while not having to integrate Maven by hand yourself.

The first archetype I tried was Grails archetype. I am actively working on a business idea using Grails so was curious to try grails archetype:

1. Generate the grails based project:
mvn archetype:generate \
-DarchetypeGroupId=org.grails \
-DarchetypeArtifactId=grails-maven-archetype \
-DarchetypeVersion=1.2.2 \
-DgroupId=com.mayabansi.mavenisedgrails \
-DartifactId=MavenisedGrails

You have to provide the archetypeGroupId and archetypeArtifactId as is. I chose Grails 1.2.2. You can chose which Grails version you want to use in archetypeVersion. At the time of this post, the following versions were available: grails-maven-archetypes

The groupId I chose is com.mayabansi (my company name) and mavnisedgrails is my project name. artifactId is my project name.

But, above will create a new Maven project with a POM and a standard Maven directory structure. What you won't see is anything that looks like a Grails application. So, the next step is to create the Grails project structure that you're used to:

2. mvn initialize:
mvn initialize

Above command creates a complete Grails directory structure.

New posts about:

1: Maven, Spring, Hibernate and Mockito
2. Maven and Hibernate hell.