Skip to content

HowToBuild

Quintin Siebers edited this page Oct 21, 2022 · 5 revisions

Introduction

This document explains how to set up a minimal build environment so that you can build the Ontopia source code, web applications, and complete distribution.

Requirements

To be able to build the Ontopia source code you must have the following installed:

Getting the source code

Clone the Ontopia source code from the GitHub repository (requires Git) or download the latest zipped source

Running the build

  1. Run mvn clean install to start a build of Ontopia. If this is the first time you are using Maven, or the first time you are building Ontopia, it might take a long time to run the build because Maven will first download all needed dependencies.
  2. When the build is complete, the jar/war/aar files can be found it the target folders of the modules
  3. The jar/war/aar files will also be installed in your local maven repository, so they can be used as dependencies of your local projects.

Note that it is important to do at least one full mvn clean install before starting to change code.

Using a different test port

Several modules use Jetty to run web based tests. Jetty will use port 8080 for this by default. To make Jetty use a different port (for example 9099) you can build Ontopia by running:

mvn clean install -Djetty.port=9099 -DargLine="-Dnet.ontopia.webed.test.testServerLocation=http://127.0.0.1:9099"

Building the Ontopia distribution

  1. To build the Ontopia distribution containing a fully configured Tomcat 9 with all web-applications, run mvn clean install -Pontopia-distribution-tomcat
  2. You can find the distribution in the target folder of the ontopia-distribution-tomcat module
  3. Currently this is generated as a directory with the name ontopia-distribution-tomcat-X.Y.Z-SNAPSHOT

Using a module as dependency

When one of the modules is used as a dependency for a maven project, all its dependencies will be resolved and included by Maven automatically. If you want to use one of the jars in a non-maven project, you'll have to include the dependency jars yourself. You can examine the pom.xml files for an overview of the dependencies of each module.

Using the War files

The default build will generate standalone War files for the web-applications. This means they contain all the jars they need to operate in their WEB-INF/lib directory. When you want to share Topic Maps sources between applications, you should move these jars to the server's lib directory.

Clone this wiki locally