Compile OpenMOLE


This section explains how to compile OpenMOLE from its sources and how to modify the sources. The source code repository can be found here.

Get the sources


OpenMOLE's source code is versioned under git. You can get the sources as follows:
git clone git@github.com:openmole/openmole.git

The current development versions stands in the master branch.

Compile


In order to compile OpenMOLE, you should have SBT and a JDK of version 7 or greater (we strongly recommend the use of the OpenJDK as its corresponding Runtime Environment embeds all the tools required by OpenMOLE). Here are the steps to compile OpenMOLE from a fresh clone:
cd build-system
sbt publish-local
cd ../libraries
sbt publish-local
cd ../openmole
optionally: sbt clean
sbt 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 option.

Develop


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 openmole/openmole 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:
sbt openmole:tar

You will find the resulting archive in bin/openmole/target/openmole.tar.gz.

Publish the bundles


cd build-system
sbt publish
cd ../libraries
sbt publish
cd ../openmole
sbt publish