Development Environment Setup
This page covers the steps required to build Eclipse Kura from source and to work on the framework itself. If you want to develop applications or bundles that run on Eclipse Kura, refer to the Eclipse Kura Addon Archetype guide instead.
Eclipse Kura is a plain Maven project built with the bnd tooling (bnd-maven-plugin): every bundle's OSGi manifest is generated at build time from its bnd.bnd, and Declarative Services and Metatype descriptors are generated from annotations. No Tycho, PDE or Eclipse-specific tooling is involved, so the project builds and imports like any other Maven project on Linux, macOS and Windows.
Requirements
- JDK 21
- Maven 3.9.x
- Git
On Linux (Debian/Ubuntu):
On macOS, install a JDK 21 from Adoptium and Maven with Homebrew (brew install maven). Check the installation with java -version and mvn -version.
On Windows, install a JDK 21 from Adoptium (or with winget install EclipseAdoptium.Temurin.21.JDK) and Maven by unpacking its binary zip archive and adding the bin directory to the PATH, as described in the Maven installation instructions. Check the installation in a new terminal with java -version and mvn -version.
Note
Windows is supported for building Eclipse Kura, not for running it: the framework needs a Linux system, so the packages the build produces are meant to be installed on a gateway, a virtual machine or a container.
Build
Clone the repository and build everything from its root:
The repository is a single Maven reactor:
bom/— the Bill of Materials with the managed versions of every dependency;kura/— the framework bundles, including the third-party and native wrapper bundles;distrib/— the distribution packaging that assembles the framework into the installable.debpackages;test/— the OSGi integration tests, added to the reactor by thetestsprofile.
Maven orders the modules by their dependencies, so a single command builds the bundles and then the packages, which end up under distrib/*/target/. Add -DskipTests to skip the tests: this also drops the test/ modules from the reactor.
To rebuild a single bundle after a change, run Maven in its directory:
Tests
Unit tests live in each bundle under src/test/java and run with surefire as part of the build. The OSGi integration tests live under test/: each module is a fragment of the bundle it tests and is executed inside a real OSGi framework by bnd-testing-maven-plugin, driven by its integration-test.bndrun. To run one integration-test module:
On Windows the few tests that exercise Linux-only features are skipped: the uptime read from /proc, the system packages listed through the Linux package managers, and a request aborted before its body is read. Everything else runs as it does on Linux and macOS.
The set of runtime bundles (-runbundles) of every integration-test.bndrun is resolved and committed, so a fresh checkout needs no extra step. After changing the runtime dependencies of an integration test, re-resolve and commit the updated files:
IDE setup
No IDE-specific configuration is required: import the repository as a Maven project in the IDE of your choice. Run mvn clean install -DskipTests once before importing, so that the reactor artifacts are available in the local Maven repository.
- Eclipse IDE: File | Import | Maven | Existing Maven Projects on the repository root (the m2e tooling is included in the Java packages). The optional Bndtools plug-in adds editing support for the
bnd.bndand.bndrunfiles. - IntelliJ IDEA: open the repository root and select the root
pom.xmlwhen asked; see the IntelliJ Maven documentation. - Visual Studio Code: open the repository root with the Extension Pack for Java installed; see the VS Code Java documentation.
The Eclipse Kura code style is defined by the formatter and clean-up profiles in kura/setups/formatting/ (KuraFormatter.xml, KuraCleanupProfile.xml): import them in your IDE so that contributions keep the project formatting.
Running your build
Eclipse Kura runs on a gateway or in a container, not inside the IDE: install one of the .deb packages produced under distrib/*/target/ on a supported device or virtual machine, or build a Docker image from them. See Deploy and Debug Applications for how to deploy bundles to a running instance and attach a remote debugger.
Kura examples
To get inspiration and become familiar with development on Eclipse Kura, some example bundles are available in the kura-apps repository.