Appendix D. OSGi development with the Pax tools
Pax (http://wiki.ops4j.org/display/ops4j/Pax) is an umbrella project for a set of OSGi-based tools. It is itself part of the Open Participation Software for Java (OPS4J) community, whose open source model is more decentralized and open than that of some other communities. Pax projects are all about OSGi: some provide basic yet very useful utility bundles, like Pax Logging or Pax URL, and others build on top of these utilities to provide more advanced tools, like Pax Web.
We’ll focus here on two projects from the Pax family:
- Pax Runner—A tool for provisioning and launching an OSGi container
- Pax Construct—A Maven-based build-management system for OSGi
Both can be very helpful for any OSGi-related task, and they have built-in support for Spring DM. They’re certainly the best tools for getting started quickly with OSGi, as they hide most of its underlying (and error-prone) aspects.
Throughout this book, we chose to follow a standard Maven-based approach, to show that you can use ordinary tools for OSGi development. We don’t think relying on automatic tools without any understanding of what they do under the covers is a good approach, and it can put off people who want to know exactly what their tools do for them. But now that you have a good understanding of OSGi, you may want to be relieved of some of the more tedious tasks that it involves. In this case, you should definitely try Pax Runner and Pax Construct.