Grails Application Forge

Generates Grails applications

Version:

1 Introduction

This project implements a project generator for Grails as is both a Command Line (CLI) application and an API that can be run as a HTTP server, deployed to a Servlet container or executed on a Serverless platform (Google Cloud Run, Google Cloud Function, AWS Lambda or Azure Function).

2 Installation

2.1 Install with SDKman

The best way to install Grails on Unix systems is with SDKMAN which greatly simplifies installing and managing multiple Grails versions.

Before updating make sure you have latest version of SDKMAN installed. If not, run

$ sdk update

In order to install Grails, run following command:

$ sdk install grails

You can also specify the version to the sdk install command.

$ sdk install grails {project-version}

You can find more information about SDKMAN usage on the SDKMAN Docs

You should now be able to run the Grails CLI.

$ grails
| Starting interactive mode...
| Enter a command name to run. Use TAB for completion:
grails>

2.2 Install through Binary on Windows

  • Download the latest binary from Grails Forge Release

  • Extract the binary to appropriate location (For example: C:\grails)

  • Create an environment variable GRAILS_HOME which points to the installation directory i.e. C:\grails

  • Update the PATH environment variable, append %GRAILS_HOME%\bin.

You should now be able to run the Grails CLI from the command prompt as follows:

$ grails
| Starting interactive mode...
| Enter a command name to run. Use TAB for completion:
grails>

2.3 Build & Install from Source

Clone the repository as follows:

$ git clone https://github.com/grails/grails-forge.git

cd into the grails-forge directory and run the following command:

$ ./gradlew grails-cli:assembleDist

This will create a zip distribution of the CLI (named with the current version) in the grails-cli/build/distributions/ folder.

You’ll need to unzip this somewhere convenient. For example, to unzip it to a dot directory in your user home, you could do:

$ mkdir ~/.grails
$ unzip grails-cli/build/distributions/grails-cli-VERSION.zip -d ~/.grails

In your shell profile (~/.bash_profile if you are using the Bash shell), export the GRAILS_HOME directory (wherever you unzipped it to) and add the CLI path to your PATH:

bash_profile/.bashrc
export GRAILS_HOME=~/path/to/unzipped/cli
export PATH="$PATH:$GRAILS_HOME/bin"
If you’re using SDKMAN and don’t want to mess with your $GRAILS_HOME, you can also point SDKMAN to your local installation for dev purposes by using sdk install grails dev path/to/unzipped/cli

Reload your terminal or source your shell profile with source:

$ source ~/.bash_profile

You will now be able to run the Grails CLI.

$ grails
| Starting interactive mode...
| Enter a command name to run. Use TAB for completion:
grails>

3 Release History

6.0.0-M4

  • In the previous release, the grailsVersion and grailsGradlePlugin version points to the 6.0.0-SNAPSHOT for a newly created Grails application. This Release fix the problem by correctly pointing them to 6.0.0-M4.

  • There was no embedded servlet selected by default, but this release select Embedded Tomcat as the default servlet implementation.

  • Add New Option for selecting the Embedded Servlet implementation between Tomcat, Jetty, Undertow, or None.

6.0.0-M3

  • Initial Milestone Release

6.0.0-M2

  • Initial Milestone Release