Update plugin docs with latest HTML
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@608044 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/doc/maven-bundle-plugin-bnd.html b/bundleplugin/doc/maven-bundle-plugin-bnd.html
index f920947..5fa0afe 100644
--- a/bundleplugin/doc/maven-bundle-plugin-bnd.html
+++ b/bundleplugin/doc/maven-bundle-plugin-bnd.html
@@ -171,6 +171,8 @@
variable substitution will be performed on the resource, where
variables in the resources are denoted with "${ ... }" syntax.</p>
+<p>By default the bundle plugin converts the project's Maven resource directories into a single <tt><Include-Resource></tt> instruction. If you specify your own <tt><Include-Resource></tt> instruction, this will replace the generated one. To include the generated list of Maven resources in your own <tt><Include-Resource></tt> instruction just add {<tt>maven-resources</tt>} to the list and it will be expanded automatically.</p>
+
<h3><a name="MavenBundlePlugin(BND)-{{<ImportPackage>}}"></a><tt><Import-Package></tt></h3>
<p>The <tt><Import-Package></tt> instruction is a list of
@@ -194,7 +196,7 @@
<li><tt><Export-Package></tt> is assumed to be "<tt>${groupId}.${artifactId}.*</tt>", unless <tt><Private-Package></tt> is specified, then <tt><Export-Package></tt> is assumed to be empty.</li>
<li><tt><Private-Package></tt> is assumed to be empty by default.</li>
<li><tt><Import-Package></tt> is assumed to be "<tt>*</tt>", which imports everything referred to by the bundle content, but not contained in the bundle.</li>
- <li><tt><Include-Resource></tt> is assumed to be "<tt>src/main/resources/</tt>",
+ <li><tt><Include-Resource></tt> is generated from the project's Maven resources, typically "<tt>src/main/resources/</tt>",
which will copy the specified project directory hierarchy into the
resulting bundle JAR file, mirroring standard Maven behavior.</li>
<li><tt><Bundle-Version></tt> is assumed to be "<tt>${pom.version</tt>}" with '-' character separator of the qualifier replaced with a '.' character.</li>
@@ -206,7 +208,7 @@
</ul>
-<p>Since the plugin creates bundles for OSGi R4, it hard codes <tt>Bundle-ManifestVersion</tt>
+<p>Since the plugin creates bundles for OSGi R4, it hard-codes <tt>Bundle-ManifestVersion</tt>
to be '2'. Additionally, it generates imports for every export to
ensure package substitutability, which is very important when working
with collaborating services. It is possible to override any of these
@@ -241,7 +243,7 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.core</artifactId>
- <version>0.8.0-incubator</version>
+ <version>1.0.0</version>
</dependency>
</dependencies>
<build>
@@ -467,9 +469,11 @@
<p>The default goal <tt>bundle</tt> 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)-Embeddingdependencies"></a>Embedding dependencies</h1>
-<p>The Maven Bundle Plugin supports embedding project dependencies into the built bundle using the <tt><Embed-Dependency></tt> instruction listing all dependencies in standard Bundle manifest header syntax:</p>
+<p>The Maven Bundle Plugin supports embedding of selected project dependencies inside the bundle by using the <tt><Embed-Dependency></tt> instruction:</p>
<div class="code"><div class="codeContent">
<pre class="code-xml"><span class="code-tag"><Embed-Dependency></span>dependencies<span class="code-tag"></Embed-Dependency></span></pre>
@@ -485,6 +489,8 @@
</pre>
</div></div>
+<p>The plugin uses the <tt><Embed-Dependency></tt> instruction to transform the project dependencies into <tt><Include-Resource></tt> and <tt><Bundle-ClassPath></tt> clauses, which are then appended to the current set of instructions and passed onto BND.</p>
+
<p>some examples:</p>
<div class="code"><div class="codeContent">
@@ -495,7 +501,7 @@
<span class="code-tag"><Embed-Dependency></span>aopalliance;scope=!test;inline=true<span class="code-tag"></Embed-Dependency></span></pre>
</div></div>
-<p>By default matched dependencies are embedded in the bundle under as <tt>artifactId-version.jar</tt>. This behaviour can be modified using the following instructions:</p>
+<p>By default matched dependencies are embedded in the bundle as <tt>artifactId-version.jar</tt>. This behaviour can be modified using the following instructions:</p>
<ul>
<li><tt><Embed-StripVersion>true</Embed-StripVersion></tt> - removes the version from the file (ie. <em>artifactId.jar</em>)</li>
@@ -518,6 +524,15 @@
<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>
+
+<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
+though they also exist inside the embedded jar. If you want to export
+packages from an embedded dependency without such duplication then you
+can either inline the dependency, or use a new BND instruction called <tt><_exportcontents></tt>.</p>
+
+<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>