Project Build Instructions

This page gives instructions for building the base Emmet WAR file. Instructions for building the site documentation are also included.

Before you do this, you will need to setup the relevant build tools and IDE. Please refer to the generic tool setup instructions.

Emmet depends on Maven artifacts from Chico, so you need to checkout and build Chico as described here before building Emmet.


Building the standard WAR files

To perform a clean build of the Emmet WAR file, do the following:

  1. Change directory to the "emmet" directory in your sandbox.
  2. Run the following command to build the standard WAR files:
        mvn -Dmaven.test.skip=true clean package

The WAR files will be created in the "target" subdirectories of the respective "webapp" and "demosite" modules.

The "-Dmaven.test.skip=true" tells Maven to skip the running of unit and system tests. Some unit tests will inevitably fail unless you have set up your test environment, and this will cause the build to fail.

Building custom site WAR files

This page describes the how you can capture site-specific configuration and tailorings as a custom site project. If you have done this, the steps for creating the WAR file for the project would be as follows:

  1. Build the standard WAR files as above.
  2. Install the Emmet artifacts into your local Maven repository by running the following command:
        mvn -Dmaven.test.skip=true install
  3. Change directory to your custom site project directory in your sandbox.
  4. Run the following command to do a clean build your site's WAR file.
        mvn clean package

Building the Maven site documentation tree

To build the Maven site for the project, do the following:

  1. Change directory to the "emmet" directory in your sandbox.
  2. Run the following command to build a local copy of the site documentation tree:
        mvn -o site

    This will give you a local copy of the documentation tree in the "target/site" subdirectory.

    The "-o" option causes Maven to not attempt to refresh the bundles for Emmet's external dependencies. This speeds up the site build, at the expense of not generating all dependencies.

  3. Provided that you have the correct permissions, you can generate and deploy the site tree to its public location by running:
        mvn site-deploy

    You can browse the "target/site" tree in-place by providing a suitable "file:" URL to your web browser. However the hyperlinks between the parent package and the child packages won't resolve correctly unless the HTML is deployed to its proper place.

    To address this and similar issues, the Maven site plugin also allows you to Stage a site to a staging webserver.