You can build a 'debug' build using:
mvn package
Or a 'production' build using:
mvn package -Dproduction
Both options will build nics.war to the webapp/target/ directory.
The NICS Web Application requires the following configuration files:
- AMConfig.properties
- core.properties
- newUserEnabledTemplate.txt.erb
- openam.properties
- openam-tools.properties
- sso-tools.properties
These configuration files will be loaded from /opt/data/nics/config directory unless changed using the config.xml file,
the default version of which can be found at webapp/src/main/resources/config.xml in the source repository.
The NICS Web Application provides a Dockerfile capable of running the application as a Docker container based on Tomcat.
Follow these steps to build the docker container:
- Build the WAR file (see above)
- Place the required application configuration files in the
configdirectory - Build the Docker image using the Docker build command
Further documentation is available in the NICS Common Wiki.
A production build takes some extra steps to optimize the static resources like minifying the Javascript.
Each 'module' is a maven jar project. It will package any compiled Java code for that module, plus any static resources (Javascript, CSS, Images) in META-INF/resources. When these jars are included in the webapp WAR project, they Java will be executed at runtime and the static resources will be available.
Just add the module as a dependency of the webapp WAR project and add any code to bootstrap your module. This will likely include adding your module to main.js in the webapp and adding html link tags for your CSS to be included.