What is the Grails plugin for Maven ?

The Grails plugin for maven is a set of goals to easily develop a Grails application using maven 2.

Goals Overview

Enhanced Grails services for maven 2

  • grails:create-pom to create a maven2 pom for an existing Grails project.
  • A grails-app packaging defining
    • a customized default lifecycle with the following services :
      • runs grails unit-tests and integration-tests in test phase
      • runs (if grails.webtest.enable = true) grails web-tests in integration-test phase
      • copies projects dependencies of type jar which have not a provided or system scope in the lib directory.
      • creates a WAR archive using grails which can be installed and deployed by maven.
    • a customized clean lifecycle which call the clean target of grails and delete the libraries found in the lib directory (populated in the package phase of the default lifecycle)

Standard Grails services

Those goals don't require a POM to be executed. They are just wrappers around Grails commands.

Usage

Instructions on how to use the Grails plugin can be found here .

Examples

To provide you with better understanding of some usages of the Grails plugin, you can take a look into the following examples: