(Quick Reference)

war

目的
Purpose

The war command creates a Web Application Archive (WAR) file which can be deployed on any Java EE compliant application server.

使用例
Examples

grails war
grails test war
grails -Dgrails.env=staging war

詳細
Description

使用方法:

Usage:
grails [environment]* war [filename]* [arguments]*

引数:

Arguments:
  • filename - The path and name to use in place of the default
  • nojars - Packages the WAR with no jar files. Used for shared deployment

発生するイベント:

Fired Events:
  • StatusFinal - When the WAR file has been created

By default the war command creates a web application archive (WAR) file using the application name and version number. The war command is different from most commands since it runs in the production environment by default instead of development, but like any script the environment can be specified using the standard convention:

grails test war
grails dev war
grails prod war
grails war /foo/bar/mywar.war
grails war --nojars

You can also specify a custom environment:

grails -Dgrails.env=UAT war

Once the WAR has been created you can deploy it to your container using its standard WAR deployment process.