Skip to content

Building A Local Grails Installation

Jeff Scott Brown edited this page Feb 29, 2016 · 5 revisions

The notes below are a cheat sheet to help a developer build and use an installation of Grails from source. This is useful when making changes to Grails locally and to test out changes that others have made recently that have not yet been released.

The paths and commands are written as would be appropriate on OS X or Linux. Adjust accordingly if you are using Windows.

Clone The Repository

cd ~/development
git clone [email protected]:grails/grails-core.git

Build The Local Distribution

cd ~/development/grails-core
./gradlew install

Ignore Doc Generation

To speed up the build you may opt to exclude the generation of documentation.

./gradlew install -x groovydoc -x javadoc

Configure Environment

Setting GRAILS_HOME

The project workspace may now be used as a GRAILS_HOME in the same way that a downloaded distribution may be used.

export GRAILS_HOME=~/development/grails-core
export PATH=$GRAILS_HOME/bin:$PATH

Using SdkMan

sdk install grails dev ~/development/grails-core

The "dev" there is just a label and could be just about anything. The label may be used the same way that you might use a version number with sdkman.

sdk use grails dev

Branches

Which branch you want to build will depend on which version of Grails you are trying to build. In general, there are branches for each of the major development lines (3.1.x, 3.0.x, 2.5.x, 2.4.x, etc...). The master branch is always the latest development line. At the time of this writing the master branch contains the latest Grails 3.2.x development code.

Be aware that building from development source means you may be accessing partially implemented features.

Clone this wiki locally