The Grails artifacts are published directly to the Codehaus Maven repositories. The release repository is automatically synchronised with
repo1.maven.org/maven2/ , so you don't need to configure it yourself unless you want to. However, if you want to try out the latest development version of Grails, then you
will need to configure the snapshot repository.
| Repository | URL |
|---|
| Release | http://repository.codehaus.org/ |
| Snapshots | http://snapshots.repository.codehaus.org/ |
Here is a list of the Grails artifacts that your Maven project can use:
| Artifact | Description |
|---|
| grails-spring | Mainly contains the Spring BeanBuilder and WebBeanBuilder. |
| grails-core | Core library for Grails applications. All Grails applications need this at least. You usually don't need to depend on it directly because all the feature artifacts depend on it (Web, Web Flow, GORM, etc.). |
| grails-cli | Enables use of the Grails command line (i.e. grails .... ) |
| grails-gorm | GORM - the Grails database access layer. |
| grails-web | Used to build standard Grails web applications, with controller, tag library, and GSP support. |
| grails-webflow | Grails WebFlow library. |
| grails-crud | Grails scaffolding library. |
| grails-test | Support classes for easier testing of controllers, web flows, tag libraries, and GSPs. |
Optional dependencies
Your Grails projects may also need some extra dependencies that are not provided via the Grails artifacts.
grails-core
| Name | Dependency | Why? |
|---|
| log4j | | Default logging implementation for Grails |
grails-gorm
| Name | Dependency | Why? |
|---|
| ehcache | | Hibernate second-level cache |
| ejb3-persistence | | Hibernate annotations |
| hibernate-annotations | | Hibernate annotations |
| hibernate-commons-annotations | | Hibernate annotations |
| hsqldb | | In-memory database for quickly getting started. Recommended. |
| oscache | | Default implementation for Hibernate second-level cache. |
grails-web
| Name | Dependency | Why? |
|---|
| commons-fileupload | | Grails file upload support |
| jasper-compiler | | JSP with embedded Jetty |
| jasper-compiler-jdt | | JSP with embedded Jetty |
| jasper-runtime | | JSP with embedded Jetty |
| jetty | | "run-app" with embedded Jetty |
| jetty-util | | "run-app" with embedded Jetty |
| servlet-api | | "run-app" with embedded Jetty |
| start | | "run-app" with embedded Jetty |
| jetty-naming | | JNDI for embedded Jetty |
| jetty-plus | | JNDI for embedded Jetty |
Installing and uploading artifacts
The Grails build has two targets for Maven-related activities:
-
maven-install - installs the current Grails artifacts to the local Maven repository
-
maven-deploy - uploads the current Grails artifacts to the Codehaus Maven repository
See the
Codehaus Maven repository instructions for full details of how to set up repository uploads. Most of the work has already been done, but to perform the actual upload, you will need to add the following to your Maven settings (usually
~/.m2/settings.xml ):
<settings>
…
<servers>
<server>
<id>codehaus.org</id>
<username>USERNAME</username>
<password>PASSWORD</password>
</server>
</servers>
…
</settings>