Grails - The Command Line



Description

The command line system of the Grails is used for building an application by using APIs and creating the code generation. You can search the repository of a current application by using the below command line:

 
grails <<command name>>

For instance:

The command grails run-app is used for running an application. It will search the application and profile for below commands:

  • project_home/src/main/scripts/run-app.groovy

  • [profile]/commands/run-app.groovy

  • [profile]/commands/run-app.yml

You can get list of Grails commands by using the grails help command and displays the list as shown in the image below:

Grails Help

The command line system includes below concepts:

S.N.Concept & Description
1 Interactive Mode
It runs the JVM and provides the commands for quicker execution.
2 Creating Custom Scripts and Commands
You can create your own custom scripts and custom commands from the root of the application.
3 Building with Gradle
It is used for performing some tasks such as compilation, runnings tests etc on your application.
Advertisements