P. 1
The Maven Cookbook Early PreAlpha

The Maven Cookbook Early PreAlpha

|Views: 229|Likes:
Published by sherifwahiblive

More info:

Published by: sherifwahiblive on Sep 11, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/20/2011

pdf

text

original

Once you start the web management console for Apache Felix, you can start to manage the
installed bundles. You can start and stop bundles via the interface, and you can install bundles
from remote repositories. If you prefer to use the shell interface from the previous recipe, click
on the Shell interface and you can enter in any of the commands you used at the command-line
Felix management console as shown in Figure 1.3, “Running the Apache Felix Shell via the
Administrative Web Console”.

Cooking with Maven and OSGi

10

Figure 1.3. Running the Apache Felix Shell via the Administrative Web Console

You can manage Felix interactions with events and repositories, and you can also restart, stop,
and change the default run levels. Clicking on the "System Information" tab will also allow you
to get some statistics about the runtime container as shown in Figure 1.4, “Managing the Apache
Felix via System Information”.

Figure 1.4. Managing the Apache Felix via System Information

When we imported these bundles into the project, they were added to the provision/pom.xml

Cooking with Maven and OSGi

11

file, and we had to install all of a bundle's dependencies one by one. Instead of listing out each of
bundle's dependencies on the command-line, we can tell the Pax plugin to import transitive
bundle dependencies and optional bundles. The following command line will instruct the Pax
plugin to install a bundle's full compile and runtime dependencies in provision/pom.xml.

~/examples/osgi/osgi-project $ mvn pax:import-bundle \

-DgroupId=org.apache.felix \
-DartifactId=org.apache.felix.http.jett

y \

-Dversion=1.0.1 \
-DimportTransitive=true \
-DimportOptional=true \
-DwidenScope=true

The importTransitive and importOptional options tell the Pax plugin to look at the OBR
metadata to find bundle dependencies. The widenScope parameter tells the Pax plugin to install
all compile and runtime dependencies as bundles in provision/pom.xml.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->