(Quick Reference)

2 Getting Started - Reference Documentation

Authors: Graeme Rocher

Version: 5.0.8.RELEASE

2 Getting Started

Checking out and Building

The project is currently hosted on Github at .

You are free to fork the project from there or clone it anonymously using git:

git clone [email protected]:grails/grails-data-mapping.git
cd grails-data-mapping

The project has a Gradle build. You will need Intellij 15 or greater to work with the source code.

Use the Intellij 15 Gradle tooling to import the project.

To build the project you can run the assemble task:

./gradlew assemble

To install the jar files for the various subprojects into your local Maven repository you can run:

./gradlew install

To build all of the documentation run the command:

./gradlew allDocs

Documentation will produced in the build/docs directory.

If you experience PermGen errors when building documentation you may need to increase the JVM permgen inside GRADLE_OPTS

Project Structure

The project is essentially a multi-project Gradle build. There is a core API and then subprojects that implement that API. The core API subprojects include:

  • grails-datastore-core - The core API, this provides core interfaces for implementing a GORM provider
  • grails-datastore-gorm - The runtime meta-programming and AST transformation infrastructure behind GORM. Also provides end users APIs like grails.gorm.CriteriaBuilder and grails.gorm.DetachedCriteria
  • grails-datastore-gorm-support - Support classes for easing the writing of a GORM plugin for Grails
  • grails-datastore-gorm-tck - The TCK that includes hundreds of Spock specifications that a GORM implementation will need to pass
  • grails-datastore-web - Classes required to integrate GORM into a web tier

Beyond these core subprojects there are implementations for various datastores. For example:

  • grails-datastore-mongodb/grails-datastore-gorm-hibernate - GORM for Hibernate
  • grails-datastore-mongodb/grails-datastore-gorm-mongo - GORM for MongoDB project
  • grails-datastore-neo4j - GORM for Neo4j project
  • grails-datastore-redis/grails-datastore-gorm-redis - GORM for Redis project
  • grails-datastore-cassandra/grails-datastore-gorm-cassandra - GORM for Cassandra project

The documentation for each implementation is kept in the documentation subprojects that start with grails-documentation. There are documentation projects for the core API, MongoDB, Neo4j, Redis, and Cassandra.

Finally the Grails 3 plugins that are used to distribute the GORM implementations to end users can be found in the grails-plugins directory and the grails2-plugins directory for Grails 2.x.