Skip to content
Alejandro Medrano edited this page Mar 17, 2018 · 2 revisions

Build universAAL Karaf Distribution from source

  1. You may build from source: download, or clone, https://github.com/universAAL/distro.karaf git clone https://github.com/universAAL/distro.karaf. Notice this will checkout the latest development version, if you want to use a specific version of universAAL check out one the the tags git checkout <version>
  2. maven install it cd distro.karaf mvn install
  3. cd target/assembly run bin/karaf (use the .bat or the .sh according to your Operative System)
  4. this will start universAAL middleware by default. To add specific components use the command feature:install <name_of_component>, you may find the full list of components by running the command feature:list | grep universAAL (please find the documentation about the functions each provide and how to configure each on our wikis)
  5. you may add your modules (a.k.a. bundles) to the deploy folder, this will automatically launch them. As an alternative you can create your own karaf features

You may redistribute by zipping the whole assembly folder, or using the provided compressed files.

Customizing universAAL Distribution

To configure your own distribution we recommend to fork, or clone locally, the distro.karaf repository and provide your configuration in the src/main/filtered-resources. Notice this folder is organized as if this where the root karaf folder, yet there are some key differences:

  • Files will be filetered by Maven, this means you may use properties (like ${property.name}) to get replaced by this process.
  • Filtered Files are used to replace the official (with some extra modifications, like dependencies already downloaded). Thus it is not recommended to create files like the karaf binaries.
  • Equally notice this methodology is Karaf version agnostic, keeping your files karaf agnostic will help upgrade to new Karaf versions
  • Just by changing karaf plugin version in the pom.xml file the base karaf version used is changed.

Please read about karaf to get the best result.

Selecting universAAL and Karaf versions

In the assembly branch selecting universAAL is as easy as changing the pom.xml version to the universAAL version you need (possibly the uAAL.karaf.feature dependency version also). To change the karaf version just change the karaf.version property (it will affect all the org.apache.karaf.x dependencies and plugins).

Running universAAL 3.3.0 and below on Karaf 3.x and above

mw.karaf.shell.universAAL.osgi (which provides universAAL karaf commands) and mw.connectors.deploy.karaf.osgi (providing the automatic deploy function) are based on the karaf interfaces. Previous to 3.4.0 these interfaces were fixed to karaf 2.x; thus you will have problems trying to run in this configuration.

To solve it you need to create a version of these artifacts where versions of karaf interfaces are bracked, i.e: something like [2.2,4.0)