Dependency Manager - Development

When downloading or checking out the source code, please also consult the README in the dependencymanager directory for up to date instructions on how to build that particular version.

The Dependency Manager is built with Maven since version 5, see What’s new in version 5. The earlier releases (r16 and older) are built with Gradle and bndtools; the instructions for those are in the README.src of their source release.

Prerequisites

  • A recent JDK, 11 or later.

  • Maven 3.9 or later.

  • The Felix Framework, Gogo and Configuration Admin bundles which the integration tests run on have to be in the local Maven repository: either install those modules of the felix-dev repository first, or use released versions.

If you are using a corporate http proxy, set it up in your ~/.m2/settings.xml.

Compilation using Maven

All commands are run from the dependencymanager directory of the felix-dev repository.

  • Compile everything, run the unit tests and the OSGi integration tests:

    $ mvn clean install
  • Compile without running the tests:

    $ mvn clean install -DskipTests
  • Build and test a single bundle, with the modules it depends on:

    $ mvn clean install -pl org.apache.felix.dependencymanager.shell -am

The modules are:

Module Content

org.apache.felix.dependencymanager

the API and implementation

org.apache.felix.dependencymanager.annotation

the annotations and the bnd plugin that processes them

org.apache.felix.dependencymanager.runtime

loads the components declared with annotations

org.apache.felix.dependencymanager.shell

the Gogo shell commands

org.apache.felix.dependencymanager.lambda

the lambda based API

org.apache.felix.dependencymanager..itest.

the integration tests, run inside a framework with the bnd-testing-maven-plugin

org.apache.felix.dependencymanager.samples, org.apache.felix.dependencymanager.lambda.samples

samples

org.apache.felix.dependencymanager.benchmark

a stress test

Using an IDE

Import the dependencymanager directory as a Maven project, for example with m2e in Eclipse or with the Maven support of IntelliJ IDEA. The unit tests run as plain JUnit tests. The integration tests are run by Maven (mvn verify), because they need an OSGi framework.

Releasing

A release is made with the Maven release plugin from the dependencymanager directory. release:prepare tags the whole build (dependencymanager-parent-x.y.z) and release:perform also tags every released bundle (<artifactId>-<version>).