Skip to content

Commit

Permalink
Update the command line usage reference (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
matrei authored Dec 6, 2023
1 parent b8bf4d6 commit 557cf14
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions src/en/ref/Command Line.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,23 @@
=== Command Line Usage


Grails incorporates the powerful build system http://gradle.org[Gradle].
Grails incorporates a CLI and also uses the powerful build system https://gradle.org[Gradle].

The basic usage scenario is:

[source,groovy]
[source,console]
----
grails <<environment>>* <<command name>>
grails <<command name>> <<options>>*
----

Grails searches in the following directories for Gant scripts to execute:
When running Gradle tasks you can specify the environment that the command executes in with an optional grails.env parameter, either with one of the built-in environment names:

* `USER_HOME/.grails/scripts`
* `PROJECT_HOME/src/main/scripts/`
* `PROJECT_HOME/plugins/*/scripts`
* `GRAILS_HOME/scripts`

If multiple matches are found Grails will give you a choice of which one to execute.

You can specify the environment that the command executes in with an optional grails.env parameter, either with one of the built-in environment names:

[source,groovy]
[source,console]
----
./gradlew bootRun -Dgrails.env=dev
./gradlew bootRun -Dgrails.env=test
./gradlew bootRun -Dgrails.env=prod
----

Or using a -D argument if the name is not one of the three standard names:

[source,groovy]
----
grails -Dgrails.env=uat run-app
./gradlew bootRun -Dgrails.env=custom
----

Refer to the user guide section on link:{guidePath}/commandLine.html[The Command Line] for more information.

0 comments on commit 557cf14

Please sign in to comment.