Refresh bundleplugin docs
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@618629 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/doc/maven-bundle-plugin-bnd.html b/bundleplugin/doc/maven-bundle-plugin-bnd.html
index 5fa0afe..2f514b7 100644
--- a/bundleplugin/doc/maven-bundle-plugin-bnd.html
+++ b/bundleplugin/doc/maven-bundle-plugin-bnd.html
@@ -398,6 +398,36 @@
</pre>
</div></div>
+<h2><a name="MavenBundlePlugin(BND)-AddingOSGimetadatatoexistingprojectswithoutchangingthepackagingtype"></a>Adding OSGi metadata to existing projects without changing the packaging type</h2>
+
+<p>If you want to keep your project packaging type (for example "jar") but would like to add OSGi metadata<br>
+you can use the manifest goal to generate a bundle manifest. The maven-jar-plugin can then be used to<br>
+add this manifest to the final artifact. For example:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-xml"><span class="code-tag"><plugin></span>
+ <span class="code-tag"><artifactId></span>maven-jar-plugin<span class="code-tag"></artifactId></span>
+ <span class="code-tag"><configuration></span>
+ <span class="code-tag"><archive></span>
+ <span class="code-tag"><manifestFile></span>${project.build.outputDirectory}/META-INF/MANIFEST.MF<span class="code-tag"></manifestFile></span>
+ <span class="code-tag"></archive></span>
+ <span class="code-tag"></configuration></span>
+<span class="code-tag"></plugin></span>
+<span class="code-tag"><plugin></span>
+ <span class="code-tag"><groupId></span>org.apache.felix<span class="code-tag"></groupId></span>
+ <span class="code-tag"><artifactId></span>maven-bundle-plugin<span class="code-tag"></artifactId></span>
+ <span class="code-tag"><executions></span>
+ <span class="code-tag"><execution></span>
+ <span class="code-tag"><id></span>bundle-manifest<span class="code-tag"></id></span>
+ <span class="code-tag"><phase></span>process-classes<span class="code-tag"></phase></span>
+ <span class="code-tag"><goals></span>
+ <span class="code-tag"><goal></span>manifest<span class="code-tag"></goal></span>
+ <span class="code-tag"></goals></span>
+ <span class="code-tag"></execution></span>
+ <span class="code-tag"></executions></span>
+<span class="code-tag"></plugin></span></pre>
+</div></div>
+
<h2><a name="MavenBundlePlugin(BND)-BuildingthePlugin"></a>Building the Plugin</h2>
<p>The plugin is hosted at the Apache Felix project. The following
@@ -434,31 +464,44 @@
<p>Where GOAL is one of the following:</p>
<ul>
- <li><tt>bundle</tt> - build an OSGi bundle jar<br>
+ <li><b><tt>bundle</tt></b> - build an OSGi bundle jar<br>
configuration options:
<ul>
- <li><tt>manifestLocation</tt> defaults to ${project.build.outputDirectory}/META-INF</li>
- <li><tt>unpackBundle</tt> unpack bundle contents to output directory, defaults to false</li>
- <li><tt>supportedProjectTypes</tt> defaults to "jar","bundle"</li>
+ <li><em><tt>manifestLocation</tt></em> defaults to ${project.build.outputDirectory}/META-INF</li>
+ <li><em><tt>unpackBundle</tt></em> unpack bundle contents to output directory, defaults to false</li>
+ <li><em><tt>excludeDependencies</tt></em> exclude all dependencies from the classpath passed to Bnd, defaults to false</li>
+ <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li>
</ul>
</li>
- <li><tt>bundleall</tt> - build an OSGi bundle jar for all transitive dependencies<br>
+</ul>
+
+
+<ul>
+ <li><b><tt>bundleall</tt></b> - build an OSGi bundle jar for all transitive dependencies<br>
configuration options:
<ul>
- <li><tt>supportedProjectTypes</tt> defaults to "jar","bundle"</li>
+ <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li>
</ul>
</li>
- <li><tt>wrap</tt> - as above, but limited to the first level of dependencies<br>
+</ul>
+
+
+<ul>
+ <li><b><tt>wrap</tt></b> - as above, but limited to the first level of dependencies<br>
configuration options:
<ul>
- <li><tt>supportedProjectTypes</tt> defaults to "jar","bundle"</li>
+ <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li>
</ul>
</li>
- <li><tt>manifest</tt> - create an OSGi manifest for the current project<br>
+</ul>
+
+
+<ul>
+ <li><b><tt>manifest</tt></b> - create an OSGi manifest for the current project<br>
configuration options:
<ul>
- <li><tt>manifestLocation</tt> defaults to ${project.build.outputDirectory}/META-INF</li>
- <li><tt>supportedProjectTypes</tt> defaults to "jar","bundle"</li>
+ <li><em><tt>manifestLocation</tt></em> defaults to ${project.build.outputDirectory}/META-INF</li>
+ <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li>
</ul>
</li>
</ul>
@@ -467,11 +510,11 @@
<p>There are also new instructions available from the underlying BND
tool, which continues to be improved independently; for the latest see <span class="nobr"><a href="http://aqute.biz/Code/Bnd" title="Visit page outside Confluence" rel="nofollow">BND documentation<sup><img class="rendericon" src="maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span>.</p>
-<p>The default goal <tt>bundle</tt> will be initialized by setting the <packaging> entry to "bundle".</p>
+<p>The default goal <b><tt>bundle</tt></b> will be initialized by setting the <packaging> entry to "bundle".</p>
-<h1><a name="MavenBundlePlugin(BND)-Thefollowingfeaturesareonlyavailableinthe1.1.0SNAPSHOTversion"></a>The following features are only available in the 1.1.0-SNAPSHOT version</h1>
+<h1><a name="MavenBundlePlugin(BND)-Thefollowingfeaturesareonlyavailableinversionsafter1.0.0"></a>The following features are only available in versions after 1.0.0</h1>
-<h1><a name="MavenBundlePlugin(BND)-Embeddingdependencies"></a>Embedding dependencies</h1>
+<h2><a name="MavenBundlePlugin(BND)-Embeddingdependencies"></a>Embedding dependencies</h2>
<p>The Maven Bundle Plugin supports embedding of selected project dependencies inside the bundle by using the <tt><Embed-Dependency></tt> instruction:</p>
@@ -524,7 +567,7 @@
<pre class="code-xml"><span class="code-tag"><Embed-Dependency></span>*;scope=compile|runtime;inline=true<span class="code-tag"></Embed-Dependency></span></pre>
</div></div>
-<h2><a name="MavenBundlePlugin(BND)-EmbedDependencyandExportPackage"></a>Embed-Dependency and Export-Package</h2>
+<h3><a name="MavenBundlePlugin(BND)-EmbedDependencyandExportPackage"></a>Embed-Dependency and Export-Package</h3>
<p>If you embed a dependency with <tt><Embed-Dependency></tt>, and your <tt><Export-Package></tt> or <tt><Private-Package></tt> instructions match packages inside the embedded jar, you will see some duplication inside the bundle. This is because the <tt><Export-Package></tt> and <tt><Private-Package></tt>
instructions will result in classes being inlined in the bundle, even
@@ -534,7 +577,7 @@
<p><tt><_exportcontents></tt> behaves just like Export-Package, except it doesn't change the content of the bundle, just what content should be exported.</p>
-<h1><a name="MavenBundlePlugin(BND)-OBRintegration"></a>OBR integration</h1>
+<h2><a name="MavenBundlePlugin(BND)-OBRintegration"></a>OBR integration</h2>
<p>The latest Maven Bundle Plugin automatically updates the local OBR
repository.xml file during the install phase, using a default location
@@ -578,8 +621,7 @@
<span class="code-tag"></configuration></span></pre>
</div></div>
-
-<h1><a name="MavenBundlePlugin(BND)-Eclipse/PDEintegration"></a>Eclipse/PDE integration</h1>
+<h2><a name="MavenBundlePlugin(BND)-Eclipse/PDEintegration"></a>Eclipse/PDE integration</h2>
<p>It is possible to configure the Maven Bundle Plugin to put the
bundle manifest where Eclipse/PDE expects it, and use the Maven
@@ -605,11 +647,22 @@
<packaging>bundle</packaging>
<build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>plugin.xml</include>
+ </includes>
+ </resource>
+ </resources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<extensions>true</extensions>
<!--
the following instructions build a simple set of public/private classes into an OSGi bundle
@@ -622,9 +675,9 @@
<!--
assume public classes are in the top package, and private classes are under ".internal"
-->
- <Export-Package>${bundle.namespace};version="${pom.version}"</Export-Package>
- <Private-Package>${bundle.namespace}.internal</Private-Package>
- <Bundle-Activator>${bundle.namespace}.internal.Activator</Bundle-Activator>
+ <Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"</Export-Package>
+ <Private-Package>${bundle.namespace}.internal.*</Private-Package>
+ <Bundle-Activator>${bundle.namespace}.internal.ExampleActivator</Bundle-Activator>
<!--
embed compile/runtime dependencies using path that matches the copied dependency folder
-->
@@ -697,7 +750,7 @@
handle any embedded entries. The pax:eclipse goal extends
eclipse:eclipse, and supports the same parameters.</p>
-<h1><a name="MavenBundlePlugin(BND)-Unpackingbundlecontentsto'target/classes'"></a>Unpacking bundle contents to 'target/classes'</h1>
+<h2><a name="MavenBundlePlugin(BND)-Unpackingbundlecontentsto'target/classes'"></a>Unpacking bundle contents to 'target/classes'</h2>
<p>Once in a while you may create a bundle which contains additional classes to the ones compiled from <tt>src/main/java</tt>,
for example when you embed the classes from another jar. This can
@@ -710,24 +763,24 @@
Thankfully there is now an easy option to do this in the bundle-plugin:</p>
<div class="code"><div class="codeContent">
-<pre class="code-java"><groupId>org.apache.felix</groupId>
-<artifactId>maven-bundle-plugin</artifactId>
-<extensions><span class="code-keyword">true</span></extensions>
-<configuration>
- <unpackBundle><span class="code-keyword">true</span></unpackBundle>
- <instructions>
- <!-- bnd instructions -->
- </instructions>
-</configuration></pre>
+<pre class="code-xml"><span class="code-tag"><groupId></span>org.apache.felix<span class="code-tag"></groupId></span>
+<span class="code-tag"><artifactId></span>maven-bundle-plugin<span class="code-tag"></artifactId></span>
+<span class="code-tag"><extensions></span>true<span class="code-tag"></extensions></span>
+<span class="code-tag"><configuration></span>
+ <span class="code-tag"><unpackBundle></span>true<span class="code-tag"></unpackBundle></span>
+ <span class="code-tag"><instructions></span>
+ <span class="code-tag"><span class="code-comment"><!-- bnd instructions --></span></span>
+ <span class="code-tag"></instructions></span>
+<span class="code-tag"></configuration></span></pre>
</div></div>
-<h1><a name="MavenBundlePlugin(BND)-UsinganexistingMANIFEST.MFfile"></a>Using an existing MANIFEST.MF file</h1>
+<h2><a name="MavenBundlePlugin(BND)-UsinganexistingMANIFEST.MFfile"></a>Using an existing MANIFEST.MF file</h2>
<p>If you have an existing manifest, you can add this to the Bnd instructions, like so:</p>
<div class="code"><div class="codeContent">
-<pre class="code-java"><_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-<Export-Package>org.example.*</Export-Package></pre>
+<pre class="code-xml"><span class="code-tag"><_include></span>src/main/resources/META-INF/MANIFEST.MF<span class="code-tag"></_include></span>
+<span class="code-tag"><Export-Package></span>org.example.*<span class="code-tag"></Export-Package></span></pre>
</div></div>
<p>Bnd will use it when calculating the bundle contents, and will also