This guide helps to create a war file for deploying the project in your local machine or a web server like Apache Tomcat.
Generating a War file
- Export the project as zip.
Extract the downloaded zip file.
Get the project location path.
In the command line, go to the project path. See the image below.
- Run the following command where
<profileName>should either be development or deployment.
mvn clean install -PprofileName
WaveMaker project has two default profiles, which are development and deployment. Prefix the profile name with a P. If you do not prefix the profile name; the system selects a development profile by default. You can add Custom Profiles from the Config Profiles section in the Project Settings options. To locate the existing profiles' path, go to Step-7.
- In the project folder, a new folder called target generates automatically with the project war file in it.
The Step-6 happens on successful build completion. On build failure due to the out-of-memory error, the profile property called build.ui.node.args should be adjusted; this configures the build. Increase the max-old-space-size memory value where the default value is 512 MB. The build should be triggered again after increasing the memory value. To do this, do the following steps.
- Go to the project folder -> profiles -> open the file <profilename.properties>. As shown in the image below:
- Adjust the value of build.ui.node.args. See the image below:
- Re-do the steps 5 and 6.