When we write an Web application in Grails, to deploy the application we need a "war" file that need's to be put in the servlet container (Tomcat etc).
First goto the project directory :
cd to_project_directory
grails war
2.Its always recommendable that you clean out your application before war creation
Cleaning application from command prompt :
grails clean
Combining the above two steps in one will result in
grails clean && grails war
Also you can specify the environment in which you want to create the war file.
grails [environment] war
Where [environment]
can take the following values: dev
, prod
or test
for example.
Unlike other commands, the war command runs in the production environment by default instead of development.