interactive

Purpose

The interactive command starts the Grails CLI in interactive mode, but is deprecated since running the grails command without a script name does the same thing. The script will be removed in a future version of Grails.

Example

grails interactive

Description

Usage:

grails [environment]* interactive

Starts the Grails CLI (script runner) in interactive mode. Interactive mode behaves the same as running Grails commands from the command line, but keeps the JVM running in between scripts. A simple command shell allows running and re-running grails commands.

By keeping the JVM running, interactive mode avoids the (costly) JVM startup time for running successive Grails commands. It also allows the JVM JIT compiler to optimize Grails scripts, so repeated commands will execute more quickly after the initial run. This significantly speeds up repeated runs of unit tests for example.

See also shell and console commands for ways to interact with a running grails app.

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
Sponsored by SpringSource