OPS4J
  Pax Runner
Added by Alin Dreghiciu, last edited by Hendy Irawan on Jul 25, 2008  (view change)

Labels

 
Overview

If any of the following is true:

  • You often change from one OSGi platform to another.
  • You don't know what OSGi is, but want to spend half an hour checking it out.
  • You can't be bothered about following the setup and requirements README for the OSGi platform of your choice.
  • You have problem to get the OSGi platform working at all.

then perhaps the Pax Runner can help. And it will not take you very long to find out, just read the easy installation steps. You have some questions? Maybe they are already answered.

How Pax Runner helps you

  • Quick start up
    You have a set of bundles you just developed or wanna test? Just place them all in the same folder, start a command prompt, go to your folder and type "pax-run". That simple.
  • Easy run on different platforms
    If you need to run your set of bundles under different platform runner helps you. You just have to type the name of your platform. That simple.
  • Easy running in different contexts
    As runner supports multiple provisioning sources, you could easily define sets of bundles that should be installed together with your bundles. You could for example have sets of bundles that you use in different development lifecycle steps, like dev, test and production. Or maybe you wanna test how your bundles behave depending on the availability of different services.

Other resources

Usage

Installation instructions

Follow this steps in order to install pax runner or watch a screencast:

  1. Download the latest version (0.12.0) from below or checkout older versions:
  2. Unpack the downloaded archive to an arbitrary folder
  3. Optional: set the PATH to include also the bin directory from the unpacked directory so you will be able to execute pax-run from anywhere.
  4. Go to the folder containing your bundles and execute pax-run. Note that this is just an example of how you could start pax runner. For other ways see how do you start it up (for jdk 1.4 use pax-run-1.4)

How do you start it up

pax-run [--option]* [provision_spec]*

where:

  • option : optional; a start up option. Can be zero, one or more.
  • provision_url : optional; a provision specification. Can be zero, one or more.

DOS/Windows users have to enclose every option between quotes ("). Check FAQ for details.

Debugging with Pax Runner

pax-run --vmOptions=-agentlib:jdwp=transport=dt_socket,server=y,address=8000

Then you can use your IDE, such as Eclipse IDE, to attach debugger to localhost port 8000.

If you use <tt>mvn pax:provision</tt>, create a file named <tt>runner.args</tt> and put <tt>--vmOptions=-agentlib:jdwp=transport=dt_socket,server=y,address=8000</tt> in it. Or you can use Maven goal configuration <tt>args</tt> that specifies the file name (<tt>runner.args</tt> is default).

More about Java JPDA debugging info here: http://articles.techrepublic.com.com/5100-10878_11-6139512.html

Provision urls

A provision specification is an URL like string that is understood by one of the scanners. Default value is "./*.jar" meaning that will scan the folder from where runner was started for all the jar files and will install them via Scanner - Directory.
If no provision schema is specified, runner will try to determine the correct schema based on the extension of your file as follow:

Extension Scanner used
pom Scanner - Maven 2 POM
jar Scanner - Bundle
bundle Scanner - Bundle
any extension Scanner - File
zip Scanner - Directory
no extension Scanner - Directory
ending with "/" Scanner - Directory
ending with "\" Scanner - Directory

If there is no protocol specified and runner can find a file that matches it will automatically transform it to an valid file url. This means that you can simply use a provision url as mybundles.txt and runner will resolve it for you from the current folder.

Options

If the default settings of runner does not suit you below you can find a set of usual options that allow you to control runner behavior (listed alphabetically).
For a detailed list of options take a look at this page.

Option key Description Default
clean|noClean see org.ops4j.pax.runner.platform.clean see option
console|noConsole see org.ops4j.pax.runner.platform.console see option
ee see org.ops4j.pax.runner.platform.ee see option
log the logging level to be used by runner (NONE,FATAL,ERROR,WARNING,INFO,DEBUG,TRACE) INFO
platform|p the platform to be started (equinox/e/eq, felix/f, knopflerfish/k/kf, concierge/c felix
profiles see org.ops4j.pax.runner.platform.profiles see option
usePersistedState|ups see org.ops4j.pax.runner.platform.usePersistedState see option
vmOptions|vmo see org.ops4j.pax.runner.platform.vmOptions see option
version|v version of the platform to be started. See platforms for details about supported versions 1.0.3 (felix)

Legend

  • - stands for: implemented
  • - stands for: under development
  • - stands for: in design phase
  • - stands for: only an idea

Source code

https://scm.ops4j.org/repos/ops4j/projects/pax/runner ( or browse via FishEye )
This project builds with Apache Maven and uses Apache Felix's maven-bundle-plugin, and Peter Krien's bnd tool.

Issue tracker

Issues, bugs, and feature requests can be submitted to the issue tracking system.

Previous versions

For information on Pax Runner releases before 0.5.0 visit this page.

Pax Runner Modules
Pax URL - classpath — classpath: protocol handler. Provides access to classpath resources from your bundle or other bundles installed.
Pax URL - ivy — ivy: protocol handler. Provides access to Ivy artifacts. (not implemented yet)
PAX URL - obr — obr: protocol handler. Make use of OBR bundle repository.
Pax URL - war — war:/war-i: protocol handlers. Automates war deployment.
Pax URL - wrap — wrap: protocol handler. Wraps "classic" jars as OSGi bundles.
Platform - Concierge — Starts up Concierge OSGi framework
Platform - Equinox — Starts up Equinox OSGI framework
Platform - Extender — Installs platform services based via a whiteboard pattern
Platform - Felix — Starts up Felix OSGi framework
Platform - Knopflerfish — Starts up Knopflerfish OSGi framework
Scanner - Bundle — Installs a bundle specified as url.
Scanner - Directory — Install bundles available in a file system directory or zip
Scanner - File — Install bundles listed in a plain text file
Scanner - Maven 2 POM — Installs bundles listed as dependencies in a maven 2 pom.xml file
Scanner - OBR — Resolves and installs bundles references listed in a plain text file
Latest News

Pax Runner 0.12.0 has been released.
This release highlights are:

  • support for Equinox 3.4
  • improve handling of logging while embedding Pax Runner (e.g. Pax Drone)

Checkout release notes for details.

Posted at Jul 02, 2008 by Alin Dreghiciu | 0 comments
Last changed Jul 07, 2008 13:33 by Alin Dreghiciu
Labels: news, release, pax-runner, pax, runner

Pax Runner 0.11.0 has been released.
This release highlights are:

  • support for Knopflerfish 2.1.0
  • include changes from Pax URL 0.3.2 (support for maven proxies)

Checkout release notes for details.

Posted at Jun 20, 2008 by Alin Dreghiciu | 0 comments

Pax Runner supports now also the just released Knopflerfish 2.1.0.
You can use the SNAPSHOT version to try it out.

Posted at Jun 09, 2008 by Alin Dreghiciu | 0 comments

Pax Runner 0.10.0 has been released.
This release highlights are:

  • support for Felix 1.0.4
  • bug fixes
  • include changes from Pax URL 0.3.1

Checkout release notes for details.

Posted at Jun 02, 2008 by Alin Dreghiciu | 0 comments
Labels: news, release, pax-runner

Pax Runner 0.9.0 has been released.
This release highlights are:

  • support for Knopflerfish 2.0.4 and 2.0.5
  • specific profiles per framework for configuration admin service / declarative services / http service
  • new specific version profile for spring-dm: spring-dm-1.0.2

Checkout release notes for details.

Posted at Apr 11, 2008 by Alin Dreghiciu | 0 comments
Labels: news, release, pax-runner

Pax Runner 0.8.0 has been released.
This release highlights are:

  • new option for boot delegation
  • better support for Eclipse debugging (via Pax Cursor 0.4.0)
  • bug fixes
  • cached bundles names are now based on bundle symbolic name (whenever possible)

Checkout release notes for details.

Posted at Mar 16, 2008 by Alin Dreghiciu | 0 comments
Labels: news, release, pax-runner

Pax Runner 0.7.2 has been released.
This release highlights are:

  • solve spring-dm profile third-party artifacts download issues
  • new profile: url — include Pax URL handlers for using them in the targeted framework
  • include changes from Pax URL 0.3.0
    • support for maven classifiers

Checkout release notes for details.

Posted at Mar 02, 2008 by Alin Dreghiciu | 0 comments
Labels: news, release, pax-runner

Pax Runner 0.7.1 has been released.
This is a maintenance release that includes only the changes from Pax URL 0.2.1 addressing performance issues on maven artifact discovery.

Checkout release notes for details.

Posted at Feb 08, 2008 by Alin Dreghiciu | 0 comments
Last changed Feb 05, 2008 11:53 by Alin Dreghiciu
Labels: news, release, pax-runner

Pax Runner 0.7.0 has been released.
This release highlights are:

Checkout release notes for details.

Posted at Feb 05, 2008 by Alin Dreghiciu | 0 comments
Labels: news, pax-runner, felix

Pax Runner supports now in upcoming release 0.7.0 also the just released Felix 1.0.3.

Posted at Feb 04, 2008 by Alin Dreghiciu | 0 comments