"Fossies" - the Fresh Open Source Software Archive

Member "grails-core-5.2.4/grails-docs/src/test/resources/docs/ref/Command Line/war.html" (14 Sep 2022, 60439 Bytes) of package /linux/www/grails-core-5.2.4.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the grails-core-5.2.4.tar.gz project site itself.

(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 <<arguments>>*

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

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.

Grails 2.x war command allowed you to supply the argument nojars - which packaged the WAR with no jar files. In Grails 3.x, this argument is no longer available. Instead, you may use Gradle capabilities to generate a WAR without jar files. One option would be to set your dependencies as providedCompile and providedRuntime. Those two configurations have the same scope as the respective compile and runtime configurations, except that they are not added to the WAR archive. Check Gradle WAR Plugin documentation for more information.