This section explains how to compile OpenMOLE from its sources and how to modify the sources. The source code repository can be found here
OpenMOLE's source code is versioned under git
. You can get the sources as follows:
git clone https://github.com/openmole/openmole.git
git submodule init
git submodule update
The current development versions stands in the master branch.
In order to compile OpenMOLE, you should have SBT
and a JDK of version 8 or greater (we strongly recommend the use of the OpenJDK as its corresponding Runtime Environment embeds all the tools required by OpenMOLE).
You also need to install node and npm. On ubuntu and debian you can simply install those by running
sudo apt install npm nodejs-legacy
Now you can compile OpenMOLE. Here are the steps to compile OpenMOLE from a fresh clone:
optionally: sbt clean
sbt "project openmole" assemble
You can now find the application in bin/openmole/target/assemble/.
To compile offline (plain / train...) you should use:
set offline in Global := true
when in the sbt shell, or start sbt with the -offline
The OpenMOLE development team generally uses the community version of IntelliJ
Once deployed you should install the SBT and Scala plugins. You can then create an IntelliJ project containing the
OpenMOLE's folder hierarchy by clicking on the "Import Project" button in IntelliJ. Browse to the folder
and click import.
OpenMOLE is made of three different projects:
- openmole/openmole: the main project containing the source code for the core and plugins
- openmole/libraries: contains the libraries which OpenMOLE depends on but are not available as OSGi bundles from their developers. This project takes all these dependencies, wraps them in OSGi projects and generates the corresponding bundles to be later imported by OpenMOLE's main project.
- openmole/build-system: As its name stands, that's the build system :) It's very unlikely that you'll have to modify this project.
Create a standalone archive
You can create a standalone archive of your fresh OpenMOLE build and ship it around by using the task openmole:tar
You will find the resulting archive in bin/openmole/target/openmole.tar.gz
An easy way to get an OpenMOLE compilation environment up and running is to use docker. Once docker is installed on you machine you can do:
git clone https://github.com/openmole/docker-build.git
./run -v /a/local/path/on/your/system
# You should be in the docker container now, execute
You can now find the compile OpenMOLE in /a/local/path/on/your/system/openmole/openmole/bin/openmole/target/assemble/