Skip to main content
Version: v11.6.2

Building Project with Maven


This guide helps to create a war file for deploying the project in your local machine or a web server like Apache Tomcat. It also provides the required information to host static content and web applications separately.

System prerequisites

Go to Source Location

  • WaveMaker Project sources can be fetched in two ways.

Clone VCS Repository

  • Clone Project into your pipeline or your local machine using git clone <repo_url>.
  • You can clone only if you have configured custom VCS or push to your own repo (in both WaveMaker Enterprise Setups, WaveMaker Online Teams). For more information, see Configure Custom VCS.

Download Zip from Studio

  • Export the project as zip.

export project

  • Extract the downloaded zip file.

  • Get the project location path.

  • In the command line, go to the project path. See the image below.

cd <location>

locate project

Choose Profile to Build

  • WaveMaker project has two default profiles, including 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.
  • Use <ProfileName> in the next sections from  default_profile/custom_profile.

Build War file

  • Use the below command to do a maven build with the profile.
mvn clean install -P<ProfileName>

For example

mvn clean install -Pdeployment
  • This command will generate a project war file in the target directory. The project war file has both frontend artifacts (HTML, CSS, JS, images, etc), and backend artifacts (Java Classes).
  • This war file can be deployed into any webserver like Tomcat. For more information, see App Deployment to Tomcat.

Build War file and Static Content to Deploy them Separately

  • WaveMaker app consists of frontend artifacts (HTML, CSS, JS, images, etc), and backend artifacts (Java Classes). It is recommended to host frontend artifacts in Static Content Server like Nginx, apache, etc, or Content Delivery Network (CDN), and backend artifacts can be hosted on any web server like Tomcat.
  • To generate two different artifacts from a WaveMaker application, use the below command. This command takes CDN_URL as input. Configure your CDN before executing this command. Please check our docs to configure CDN.
  • Both the WAR file and static content can be seperately deployed, but both must be deployed for the app to work. Just deploying the frontend artifacts on CDN is not enough.

For specific instructions on how to use different CDNs, see WaveMaker apps integration with AWS CDN to configure CDN in AWS, and for Azure, see WaveMaker apps integration with AZURE CDN Profile.

mvn clean install -P<profile-name> -Dcdn-url=<CDN_URL>

For example

mvn clean install -Pdeployment -Dcdn-url=https://mydomain.cloudfront.net/my_app>/1234/
  • The above command generates two deployable artifacts: ui-artifacts.zip, project.war. Both these files can be found in the target folder. .
  • You can unzip the file ui-artifacts.zip and upload it to CDN origin (S3 bucket in AWS Cloudfront case, storage container in AZURE CDN Profile case), or put it into Nginx or apache).
  • Please check our docs to configure and use CDN.

For more information, see WaveMaker apps integration with AWS CDN to configure CDN in AWS, and for Azure, see WaveMaker apps integration with AZURE CDN Profile.

Handling Build Failures

  • WaveMaker build may fail due to:

    • Insufficient memory to Node Process
    • Compilation issues
  • 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 1024 MB. The build should be triggered again after increasing the memory value. There are two ways to do this:

    1. Go to WaveMaker Studio -> File Explorer -> profiles -> open the file <profilename.properties>.
    2. Or, go to the Project folder -> profiles -> open the file <profilename.properties>. As shown in the image below:

profile location

  • Adjust the value of build.ui.node.args. See the image below:

adjusting space on failure

  • Re-do build.