These prerequisites are not strict but reflect an actual build environment:
- Ubuntu 16.04.2 LTS
- OpenJDK Java 1.8.0_131
- Apache Maven 3.3.9
- Node.js v4.2.6
- NPM 3.5.2
sudo apt-get install openjdk-11-jdk
sudo apt-get install maven
Project pom file contains ria-artifactory
repository definition. This repository holds artifacts used by RIHA-Browser like RIHA-Storage-Client, for example. As this repository may not be accessible, please consider using mirror repository. Mirror repository can be configured in ~/.m2/settings.xml
file the following way
<settings>
...
<mirrors>
<mirror>
<id>ria-artifactory-mirror</id>
<name>Mirror of RIA artifactory</name>
<url>http://example.com/maven2</url>
<mirrorOf>ria-artifactory</mirrorOf>
</mirror>
</mirrors>
...
</settings>
Change at least url
to the URL of repository you would like to use as a mirror.
Install Node.js and make symlink since some NPM packages (like karma-jasmine-jquery
) depend on it
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
Install NPM
sudo apt-get install npm
Install libfontconfig
since PhantomJS relies on it
sudo apt-get install libfontconfig
Install bzip2
since some NPM packages (like PhantomJS when extracting its distro) require this
sudo apt-get install bzip2
Install NPM packages globally
sudo npm install -g karma-cli
sudo npm install -g karma
sudo npm install -g jasmine-core
sudo npm install -g karma-jasmine
sudo npm install -g karma-junit-reporter
sudo npm install -g karma-jasmine-jquery
sudo npm install -g karma-jasmine-ajax
sudo npm install -g karma-coverage
sudo npm install -g karma-phantomjs2-launcher
sudo npm install -g coffee-script@1.8.0
Project is divided into frontend and backend maven modules. Backend module depends on frontend thus requiring it to be built first.
Frontend is a Angular 13 module generated by Angular CLI version 13.3.1. It can be built using maven from within frontend
directory.
NOTE! Following commands are executed inside frontend
directory.
Build project using maven compile
task which is calling build
script from package.json
. Compiled artifacts will be outputted to the dist
directory.
mvn compile
Backend is a Tomcat-based web application serving UI as well.
NOTE! Following commands are executed inside project root directory.
Package application as deployable Tomcat war file. Packaged application will be outputted to the backend/target
directory with name browser-backend-<version>.war
mvn package
Please refer to deployment documentation for next steps.