Menu

building_osmoses

Matías SM

Table of Contents

About this page

In this page you will find all the information about how to build OsMoSes.

Building OsMoSes

Building OsMoSes consists on the following steps:

  1. Download the requirements
  2. Download the OsMoSes project
  3. Use Apache Ant to build OsMoSes

OsMoSes requirements

JADE

Being the objective of OsMoSes to provide an OSGi based mobility service for JADE, I bet you see this dependency coming. Of course, to build OsMoSes you will need to have JADE, so you can download it from its download page.

OsMoSes have been built and tested with JADE's versions:

  • 4.1.0
  • 4.2.0

Google Guava (OSGi version)

OsMoSes uses Google Guava libraries for IO and Hashing. In fact, to take advantage of OSGi modularity, OsMoSes uses Guava OSGi project.

OsMoSes have been built and tested with Guava OSGi version:

  • 11.0.1

Apache Felix OSGi Framework

OsMoSes uses Apache Felix as the embedded OSGi framework. Currently this is the only option because (as will be described next) it is dependent on Apache Felix Bundle Repository.

You can download it from its download page

OsMoSes have been built and tested with Apache Felix OSGi Framework versions:

  • 4.0.2
  • 4.0.3

Apache Felix Bundle Repository

OsMoSes uses Apache Felix Bundle Repository to handle bundle dependencies.

You can download it from the Apache Felix download page (Artifact Bundle Repository)

OsMoSes have been built and tested with Apache Felix Bundle Repository versions:

  • 1.6.6

Apache Ant

Apache Ant is only needed to build OsMoSes.
Ant is not needed for OsMoSes execution.

OsMoSes have been built using Ant version:

  • 1.7.1

Download OsMoSes Project

Download OsMoSes latest source from its repository.

Build OsMoSes

Note: The names used in this section are the defaults ones, some of them can be changed by modifying the properties defined in the tools build.properties file. If you change those properties, keep that in mind when reading this documentation.

OsMoSes can be built by means of Ant tasks, in order to allow that, each component provides its own build.xml file defining the targets:

  • compile: compiles the component creating the corresponding java .class files under the sub-directory "classes"
  • lib: creates the component's associated .jar file under the sub-directory "lib". It may correspond to a common JAR or an (OSGi) bundle, depending on the component.
  • doc: creates the component's documentation (e.g. javadoc api) under the sub-directory "doc".
  • clean: removes all generated files leaving the directory as it was checked-out.

In addition, a "main" build.xml file can be found at the root of the project. It defines the targets:

  • dist: creates a distribution archive (that can be deployed to use the OsMoSes functionality) named "osmoses_dist.zip" (see How To Use page for more information about deploying and executing JADE with OsMoSes).
  • doc: creates the component's documentation (e.g. javadoc api).
  • clean: removes all generated files leaving the directory as it was checked-out.

In general you will only need to use the dist target in the "main" build.xml.

Setting up the needed resources

To use the Ant tasks as they are, you must create a directory under "tools" called "build_deps" whit the following content:

  • tools/build_deps
    • com.google.guava_11.0.1.jar (Google guava-osgi bundle)
    • felix.jar (Apache Felix framework JAR file)
    • jade.jar (JADE jar file)
    • org.apache.felix.bundlerepository-1.6.6.jar (Felix bundle repository bundle)

Any of these names can be changed but then the file build.properties must be edited accordingly

The resulting project directory tree should have the form (note that some information has been omitted for clarity):

  • jade-osmoses
    • src (containing OsMoSes components directories)
    • tools
      • build_deps (containing OsMoSes dependencies libraries)
      • build_utils (containing OsMoSes utility building files)
      • metrics (containing OsMoSes metrics tools directories)
    • build.xml ("main" build file)

Building OsMoSes Tools

Currently the only tools that can be built are the sources related to the metrics. Like the main components of OsMoSes, each of the metrics related components has its own build.xml file defining the already described targets.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.