Building OSGi ready pebble with Maven

Update (May, 2018): As announced in Spring Framework 3.2 and the SpringSource EBR the SpringSource Enterprise Bundle Repository has been shut down.

The first step was to remove the embedded 3rd party libraries from the packaged war file and instead use the OSGi bundles provided from an OSGi runtime.

First we created a parent pom.xml:

<modelVersion>4.0.0<modelVersion>
<groupId>net.sourceforge.pebble</groupId>
<artifactId>net.sourceforge.pebble</artifactId>
<packaging>pom</packaging>
<name>Pebble</name>
<description>A lightweight, open source, Java EE blogging tool</description>
<modules>
  <module>web</module>
<modules>

and moved the whole monolithic application into one module web.

The SpringSource Enterprise Bundle Repository was a valuable resource during the process of moving non OSGi aware 3rd party libraries from within the war file into the OSGi container.

<repository>
  <id>com.springsource.repository.bundles.release</id>
  <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
  <url>http://repository.springsource.com/maven/bundles/release</url>
</repository>

<repository>
  <id>com.springsource.repository.bundles.external</id>
  <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
  <url>http://repository.springsource.com/maven/bundles/external</url>
</repository>

This post is part of a series about an OSGi experiment: Migrate a monolith to a modular OSGi application architecture.

The Beginning of an OSGi Experiment

▶︎ Building OSGi ready pebble with Maven

Third time it's a charm

▷ ...


Header cover Photo by Matthew Henry from Burst