Posts

Showing posts from August, 2020

Testing custom Apache Karaf distributions

Apache Karaf provides KarafTestSupport to easily implement test on Karaf runtime. Karaf itself uses it to test most of Karaf services in the build (including Jenkins CI). This approach doesn’t only work for Karaf “vanilla” distribution, but also for any custom distributions based on Karaf. Custom distribution is available via Maven URL To illustrate, I’m implementing a test for Apache Unommi. Apache Unomi is a actually a custom Karaf distribution. It’s available on Maven Central. For this blog, I gonna test Unomi 1.5.1 release: https://repo1.maven.org/maven2/org/apache/unomi/unomi/1.5.1/ . Let’s start with the pom.xml . It basically contains: Karaf itest common and pax exam dependencies Unomi distribution we want to test Here’s the pom.xml : <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.