2013-11-16

Repository Commands 1.1.0 - Now with Resolver support

The repository console commands bundle now has support for the Resolver Service 1.0 specification.

What this means is that the install command now has an optional [-r] flag that will try to find and install (and start if that option is given) the recursive dependencies of the bundle you are trying to install.

Until the next full release this feature is available if you build from https://www.knopflerfish.org/svn/knopflerfish.org/trunk/.

In order to try this you also need to install an implementation of the Resolver Service. There is one available at org.apache.felix.resolver-1.0.0.jar.
To make things easier you can uncomment the following line in the init.xargs file in the osgi directory:

# Uncomment the following line to add Resolver support
#-istart http://repo2.maven.org/maven2/org/apache/felix/org.apache.felix.resolver/1.0.0/org.apache.felix.resolver-1.0.0.jar


Example of how to install and start the Connection-Factories bundle (org.knopflerfish.bundle.connectors).

Knopflerfish OSGi console.
Type 'help' for help or 'alias' for a list of common commands

> /repository install -help
Usage: install [-help] [-s] [-r] <symbolicname> [<versionRange>]
  Install bundle resource.
  Installs first bundle resource that matches <symbolicname>
  and optional <versionRange>.
  -s             Persistently start bundles according
                 to activation policy
  -r             Recursively install additional bundles
                 needed to resolve
  <symbolicname> Bundle symbolic name to match
  <versionRange> Optional bundle version range
> /repository install -s -r org.knopflerfish.bundle.connectors
Installed dependency: io (#30)
Installed: Connection-Factories (#31)
Started: io (#30)
Started: Connection-Factories (#31)
> 

No comments: