Skip to content

Building

Philip Helger edited this page Mar 31, 2023 · 7 revisions

This is a pure Java project that does not require any external (non-Java) dependency.

Prerequisites

To build it you need the following prerequisites:

  • Java 1.8 or higher - 32 or 64 bit does not matter
  • Apache Maven 3.x for building - the later the better

This project is developed on Windows and successfully running on Linux environments, so building on Linux should also work, even though it was not tested.

For some of the backends, certain database systems need to be present for unit tests to work. To run local instances, you may run the following docker-compose.yml file. Thanks to @luukth-infosupport for providing this.

version: '3.9'

services:
  mysql:
    image: mysql:8
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: smp
      MYSQL_USER: smp
      MYSQL_PASSWORD: smp
    ports:
      - "3306:3306"

  mongodb:
    image: mongo:6
    environment:
      MONGO_INITDB_DATABASE: phoss-smp-test
    ports:
      - "27017:27017"

The latest version of this file resides in https://github.com/phax/phoss-smp/blob/master/unittest-db-docker-compose.yml

Build process

Locate the base folder of the project (the one containing only a pom.xml and the sub-projects) and call mvn clean install. Afterwards the final web application (*.war) resides in the folders (depending on the version):

  • phoss-smp-webapp-mongodb/target
  • phoss-smp-webapp-sql/target
  • phoss-smp-webapp-xml/target

If the build fails because a depending Java library (like ph-oton) is in a SNAPSHOT version please grab the source of the respective projects and build them yourself. Anyway, releases never depend on SNAPSHOT versions.