Maven Pax Plugin

The Pax Plugin is a "Swiss Army(tm) knife" for OSGi that provides goals to create, build, manage and deploy many types of OSGi bundles. While the easiest way to install and use this plugin is by using the Pax-Construct scripts, its goals can also be used directly on the Maven command line, or inside other Maven POMs.

Goals Overview

The first thing you probably want to do is create a new OSGi project, which you can do with the following archetype goal:

Once you have your new project, you can use the following goals to manage your project and develop new OSGi bundles:

You can also create standalone bundle or wrapper projects in empty or non Pax-Construct directories with these two goals:

These lifecycle goals help build and deploy OSGi projects - they can also be used with non Pax-Construct projects:

Usage

Instructions on how to use the Pax Plugin outside of a Pax-Construct generated project can be found here.

OPS4J repositories

Snapshots of the Pax Plugin are regularly deployed to the OPS4J snapshot repository:

  <pluginRepositories>
    <pluginRepository>
      <id>ops4j.snapshots</id>
      <url>http://repository.ops4j.org/mvn-snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>

Release candidates are deployed to the main OPS4J repository and announced on the OPS4J wiki:

  <pluginRepositories>
    <pluginRepository>
      <id>ops4j.releases</id>
      <url>http://repository.ops4j.org/maven2</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>