Led & Sustained by

G2one Logo

Developed with

Intellij

Powered by

Spring

Command Line

Command Line Reference

Usage:

For Grails 0.3 and earlier - grails [options] (target name)

For Grails 0.4 and later - grails [options] (target name) (target parameters)

Target Description
bug-report (since 0.4) Generates a ZIP containing your source artifacts for attaching to a JIRA issue
clean Cleans the current app 'tmp' directory, can be combined with other commands eg. grails clean run-app
create-app Creates a new Grails application
create-controller Convenience target for creating a controller
create-domain-class Convenience target for creating domain classes
create-data-source Convenience target for creating data sources
create-job Convenience target for creating jobs
create-service Convenience target for creating services
create-taglib Convenience target for creating tag libraries
create-test-suite Convenience target for creating test suites (deprecated since 0.5.6: http://jira.codehaus.org/browse/GRAILS-1279)
create-unit-test Convenience target for creating a unit test
create-integration-test Convenience target for creating an integration test
create-webtest Convenience target for creating functional web tests (requires WebTest Plugin)
generate-controller Generates a controller for a specified domain class
generate-views Generates CRUD views for a specified domain class
generate-all Generates both a controller and the views for a specified domain class
get-dependencies Get project's dependencies with Ivy
install-plugin ivy Install ivy dependency resolution tool
install-templates Installs the artifact and scaffolding templates
run-app Runs a grails app using the default Jetty container. The default http port is 8080. This can be customised by appending -Dserver.port=<port number> to the command line
run-app-https (since 0.6) Runs a grails app using the default Jetty container with a https listener. The default https port is 8443. This can be customised by appending -Dserver.port.https=<port number> to the command line
run-webtest Runs the functional web tests contained within the app (requires WebTest Plugin)
set-version (since 0.5) Set the version of your application, i.e. grails set-version 1.0.4
stats (since 0.5) Output some basic code metrics about your project
test-app Runs the unit tests contained within the app, or a single named test passed as the last argument
war Creates a JEE Web Application Archive (WAR) file from the current grails app
upgrade

Upgrade/Downgrade an existing project to a different Grails version





Options can be given in the format -Dname=value

name value
server.port the port number to start the server on, default:8080
grails.upgrade.warning set if user input is require or not while upgrading a project, default:y

See also: Command Line Tools

</