blob: 09d78f9cfb4128bb69daa947948eaf26c83b9e2f [file] [log] [blame]
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter&nbsp;7.&nbsp;Developing OSGi Bundles using Plug-in Development Environment (PDE)</title><meta content="DocBook XSL Stylesheets V1.76.0" name="generator"><link rel="home" href="index.html" title="Virgo Tools Guide"><link rel="up" href="index.html" title="Virgo Tools Guide"><link rel="prev" href="ch06s02.html" title="Editing the Manifest"><link rel="next" href="ch07s02.html" title="Server Runtime Wizard"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><td align="left" width="20%"><a accesskey="p" href="ch06s02.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="ch07s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;7.&nbsp;Developing OSGi Bundles using Plug-in Development Environment (PDE)"><div class="titlepage"><div><div><h2 class="title"><a name="developing_with_PDE"></a>Chapter&nbsp;7.&nbsp;Developing OSGi Bundles using Plug-in Development Environment
(PDE)
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch07.html#pde_dependencies">Resolving Bundle Dependencies</a></span></dt><dt><span class="section"><a href="ch07s02.html">Server Runtime Wizard</a></span></dt><dt><span class="section"><a href="ch07s03.html">PDE Bundle projects</a></span></dt><dt><span class="section"><a href="ch07s04.html">Publishing</a></span></dt><dt><span class="section"><a href="ch07s05.html">Migration actions</a></span></dt></dl></div>
This chapter assumes that the user is already familiar with the Plug-in Development Environment (PDE). Should this not be the case
it is recommended to read first the PDE documentation or one of the many tutorials available online.
<div class="section" title="Resolving Bundle Dependencies"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pde_dependencies"></a>Resolving Bundle Dependencies</h2></div></div></div><p>
Starting from release 1.5.0 the Tools support developing OSGi
Bundles using the widely popular Eclipse Plug-in Development
Environment (PDE).
</p><p>
While working with OSGi bundles, one of the most important
aspects is defining the required dependencies in the MANIFEST.MF file.
When used in conjunction with the PDE, the Virgo Tools address this problem
by leveraging on the PDE tooling and in particular on the PDE Target Platform Definition.
A Target Platform Definition defines the bundles which your workspace will be built against.
</p><p>
At runtime however, a PDE Target Platform won't be available and
dependency resolution will always occur against the bundle
repositories configured for the Virgo Runtime Environment. The Tools
try to bridge runtime and development by providing a Server
wizard that creates a new PDE Target Platform Definition that
matches the Server repository configuration,
as defined in
<code class="code">org.eclipse.virgo.repository.properties</code>
.
</p><p>
The Virgo Runtime Environment supports watched, external and remote
repositories. Watched and external repositories correspond to
file system folders, while a remote repository is a remote Virgo
instance that can serve its repository content to other Virgo instances
for the purpose of dependency resolution. The PDE Target Platform allows its content
to be specified only as file system folders or P2 Update sites. As such, when the Tools create a
PDE Target Platform Definition from the runtime repository configuration only watched and
external repositories are considered.
</p><p>
Developers should properly setup a local Virgo Runtime Environment so that its bundle repositories
contain their application dependencies. Then they should use the Tools to setup a PDE Target Platform
so that their workspace projects are built and resolved against the same bundles that will be available
at runtime.
</p><p>
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
Note that when using the Tools together with PDE to develop for
Virgo it's not possible to use the MANIFEST.MF headers
<code class="code">Import-Bundle</code>
(not part of the standard OSGi specification but supported by
Virgo)
and <code class="code">Require-Bundle</code>
(part of the standard OSGi specification but not supported by Virgo).
Developers will have to declare all of their external dependencies
using the
<code class="code">Import-Package</code>
header only.
</div><p>
</p></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch06s02.html">Prev</a>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;<a accesskey="n" href="ch07s02.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;</td></tr></table></div></body></html>