Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
Stuart McCulloch | 5f3ddf7 | 2008-05-03 12:49:39 +0000 | [diff] [blame] | 2 | <html><head> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 3 | |
| 4 | |
| 5 | |
Stuart McCulloch | 5f3ddf7 | 2008-05-03 12:49:39 +0000 | [diff] [blame] | 6 | <title>Apache Felix - Apache Felix Maven Bundle Plugin (BND)</title> |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 7 | <link rel="stylesheet" href="apache-felix-maven-bundle-plugin-bnd_files/site.css" type="text/css" media="all"> |
Stuart McCulloch | 5f3ddf7 | 2008-05-03 12:49:39 +0000 | [diff] [blame] | 8 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 9 | </head><body> |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 10 | <div class="title"><div class="logo"><a href="http://felix.apache.org/site/index.html"><img alt="Apache Felix" src="apache-felix-maven-bundle-plugin-bnd_files/logo.png" border="0"></a></div><div class="header"><a href="http://www.apache.org/"><img alt="Apache" src="apache-felix-maven-bundle-plugin-bnd_files/apache.png" border="0"></a></div></div> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 11 | <div class="menu"> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 12 | <ul> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 13 | <li><a href="http://felix.apache.org/site/news.html" title="news">news</a></li> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 14 | <li><a href="http://felix.apache.org/site/license.html" title="license">license</a></li> |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 15 | <li><span class="nobr"><a href="http://felix.apache.org/site/downloads.cgi" title="Visit page outside Confluence" rel="nofollow">downloads<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 16 | <li><a href="http://felix.apache.org/site/documentation.html" title="documentation">documentation</a></li> |
| 17 | <li><a href="http://felix.apache.org/site/mailinglists.html" title="mailinglists">mailing lists</a></li> |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 18 | <li><a href="http://felix.apache.org/site/contributing.html" title="Contributing">contributing</a></li> |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 19 | <li><span class="nobr"><a href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">asf<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li> |
| 20 | <li><span class="nobr"><a href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">sponsorship<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span></li> |
| 21 | <li><span class="nobr"><a href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">sponsors<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span> |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 22 | <!-- ApacheCon Ad --> |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 23 | <iframe src="apache-felix-maven-bundle-plugin-bnd_files/button.html" style="border-width: 0pt; float: left; display: none;" scrolling="no" width="135" frameborder="0" height="135"></iframe> |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 24 | <p style="height: 100px;"> |
| 25 | <!-- ApacheCon Ad --> |
| 26 | </p></li></ul> </div> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 27 | <div class="main"> |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 28 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-BundlePluginforMaven"></a>Bundle Plugin for Maven</h1> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 29 | |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 30 | <p>This plugin for Maven 2 is based on the <span class="nobr"><a href="http://www.aqute.biz/Code/Bnd" title="Visit page outside Confluence" rel="nofollow">BND<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 31 | tool from Peter Kriens. The way BND works is by treating your project |
| 32 | as a big collection of classes (e.g., project code, dependencies, and |
| 33 | the class path). The way you create a bundle with BND is to tell it the |
| 34 | content of the bundle's JAR file as a subset of the available classes. |
| 35 | This plugin wraps BND to make it work specifically with the Maven 2 |
| 36 | project structure and to provide it with reasonable default behavior |
| 37 | for Maven 2 projects.</p> |
| 38 | |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 39 | <p><em>NOTE: only compile, runtime and system scoped dependencies are passed to BND. Provided and test dependencies are <b>not</b> included in the classpath seen by BND.</em></p> |
| 40 | |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 41 | <p>Since the 1.4.0 release, this plugin also aims to automate OBR (OSGi |
| 42 | Bundle Repository) management. It helps manage a local OBR for your |
| 43 | local Maven repository, and also supports remote OBRs for bundle |
| 44 | distribution. The plug-in automatically computes bundle capabilities |
| 45 | and requirements, using a combination of Bindex and Maven metadata.</p> |
| 46 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 47 | <p><a name="ApacheFelixMavenBundlePlugin(BND)-simpleexample"></a></p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 48 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 49 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-SimpleExample"></a>Simple Example</h1> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 50 | |
| 51 | <p>Rather than going straight to a detailed list of plugin features, we |
| 52 | will first look at a simple example of how to use the plugin to give an |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 53 | immediate flavor. A detailed "<a href="#ApacheFelixMavenBundlePlugin%2528BND%2529-howto" title="how-to on Apache Felix Maven Bundle Plugin (BND)">how to</a>" will follow.</p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 54 | |
| 55 | <p>Assume that we have a simple bundle project that has a pubic API package an several implementation packages, such as:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 56 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 57 | <div class="preformatted"><div class="preformattedContent"> |
| 58 | <pre>org.foo.myproject.api |
| 59 | org.foo.myproject.impl1 |
| 60 | org.foo.myproject.impl2 |
| 61 | ... |
| 62 | </pre> |
| 63 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 64 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 65 | <p>If we also assume that we have a bundle activator in one of the implementation packages, then the <tt><plugins></tt> section of the POM file for this bundle project would look like this:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 66 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 67 | <div class="preformatted"><div class="preformattedContent"> |
| 68 | <pre>... |
| 69 | <plugins> |
| 70 | <plugin> |
| 71 | <groupId>org.apache.felix</groupId> |
| 72 | <artifactId>maven-bundle-plugin</artifactId> |
| 73 | <extensions>true</extensions> |
| 74 | <configuration> |
| 75 | <instructions> |
| 76 | <Export-Package>org.foo.myproject.api</Export-Package> |
| 77 | <Private-Package>org.foo.myproject.*</Private-Package> |
| 78 | <Bundle-Activator>org.foo.myproject.impl1.Activator</Bundle-Activator> |
| 79 | </instructions> |
| 80 | </configuration> |
| 81 | </plugin> |
| 82 | </plugins> |
| 83 | ... |
| 84 | </pre> |
| 85 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 86 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 87 | <p>The <tt><Export-Package></tt> and <tt><Private-Package></tt> instructions tell the plugin about the contents of the resulting bundle JAR file. The <tt><Export-Package></tt> instruction tells the plugin which of the available packages to copy into the bundle <b>and</b> export, while the <tt><Private-Package></tt> instruction indicates which of the available packages to copy into the bundle <b>but not</b> |
| 88 | export. If the two sets overlap, as they do in the case, then the |
| 89 | export takes precedence. Since we did not specify any values for any |
| 90 | other bundle manifest headers, they will assume default values which |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 91 | are described <a href="#ApacheFelixMavenBundlePlugin%2528BND%2529-defaultbehavior" title="default-behavior on Apache Felix Maven Bundle Plugin (BND)">below</a>. One specific behavior to highlight is that the plugin generates the <tt>Import-Package</tt> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 92 | bundle manifest header based on the contents of the bundle, which means |
| 93 | that you generally do not ever need to explicitly specify it yourself. |
| 94 | That's it.</p> |
| 95 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 96 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-Features"></a>Features</h1> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 97 | |
| 98 | <p>The BND library underlying the plugin defines instructions to direct |
| 99 | its behavior. For this Maven plugin, these instructions are issued in |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 100 | the plugin configuration section of the POM file, as was illustrated <a href="#ApacheFelixMavenBundlePlugin%2528BND%2529-simpleexample" title="simple-example on Apache Felix Maven Bundle Plugin (BND)">above</a>. BND recognizes three types of instructions:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 101 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 102 | <ol> |
| 103 | <li><em>Manifest headers</em> - Any instruction that starts with |
| 104 | a capital letter will appear in the resulting bundle's manifest file; |
| 105 | the value for the header will either be copied, augmented, or generated |
| 106 | by BND depending on the instruction.</li> |
| 107 | <li><em>Variables</em> - Any instruction starting with a lowercase letter is assumed to be a variable in the form of a name-value pair, such as <tt>version=3.0</tt>, that can be used for property substitution, but is not copied to the manifest.</li> |
| 108 | <li><em>Directives</em> |
| 109 | - Any instruction starting with a '-' character is considered to be a |
| 110 | directive that informs BND to perform some special processing and is |
| 111 | not copied to the manifest.</li> |
| 112 | </ol> |
| 113 | |
| 114 | |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 115 | <p>The remainder of this section covers the most important aspects of BND's instructions; for complete details refer to the <span class="nobr"><a href="http://www.aqute.biz/Code/Bnd" title="Visit page outside Confluence" rel="nofollow">BND documentation<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span>.</p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 116 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 117 | <p><a name="ApacheFelixMavenBundlePlugin(BND)-instructions"></a></p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 118 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 119 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-Instructions"></a>Instructions</h2> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 120 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 121 | <h3><a name="ApacheFelixMavenBundlePlugin(BND)-{{<ExportPackage>}}"></a><tt><Export-Package></tt></h3> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 122 | |
| 123 | <p>The <tt><Export-Package></tt> instruction is a list of |
| 124 | packages for the bundle to export. These packages are copied into the |
| 125 | resulting bundle JAR file from the available classes (i.e., project |
| 126 | classes, dependencies, and class path); thus, it is possible to include |
| 127 | classes into your bundle that are not associated with source files in |
| 128 | your project. <tt><Export-Package></tt> can be specified with |
| 129 | package patterns using the '*' wildcard. Also, it is possible to |
| 130 | exclude packages using negation by starting the package pattern with |
| 131 | '!'. Thus, non-negated patterns indicate which of the available |
| 132 | packages to include in the bundle, whereas negated patterns indicate |
| 133 | which should not be included in the bundle.</p> |
| 134 | |
| 135 | <p>The list of package patterns is ordered and earlier patterns are applied before later patterns. For example, if you specify "<tt>org.foo.*,!org.foo.impl</tt>" the second pattern has no effect since all <tt>org.foo</tt> packages have already been selected by the first pattern. Instead, you should specify "<tt>!org.foo.impl,org.foo.*</tt>", which will export all <tt>org.foo</tt> packages except <tt>org.foo.impl</tt>.</p> |
| 136 | |
| 137 | <p>Following standard OSGi R4 syntax, package patterns can include both |
| 138 | directives and attributes, which will be copied appropriately into the |
| 139 | generated Export-Package manifest header. Besides explicitly listing |
| 140 | package version attributes, BND will also determine package versions by |
| 141 | examining the source JAR file or from <tt>packageinfo</tt> files in the package directory.</p> |
| 142 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 143 | <h3><a name="ApacheFelixMavenBundlePlugin(BND)-{{<PrivatePackage>}}"></a><tt><Private-Package></tt></h3> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 144 | |
| 145 | <p>The <tt><Private-Package></tt> instruction is similar in every way to the <tt><Export-Package></tt> instruction, except for the fact that these packages will <b>not</b> |
| 146 | be exported by the bundle. If a package is selected by both the export |
| 147 | and private package headers, then the export takes precedence.</p> |
| 148 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 149 | <h3><a name="ApacheFelixMavenBundlePlugin(BND)-{{<IncludeResource>}}"></a><tt><Include-Resource></tt></h3> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 150 | |
| 151 | <p>The <tt><Include-Resource></tt> instruction is a list of |
| 152 | arbitrary resources that should be copied into the bundle JAR file. The |
| 153 | specified resources are declared as clauses that can have the following |
| 154 | forms:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 155 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 156 | <div class="preformatted"><div class="preformattedContent"> |
| 157 | <pre>clause ::= assignment | inline | simple |
| 158 | assignment ::= PATH '=' PATH |
| 159 | simple ::= PATH |
| 160 | inline ::= '@' PATH |
| 161 | </pre> |
| 162 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 163 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 164 | <p>For the <tt><Include-Resource></tt> instruction, actual file paths are relative to the <tt>pom.xml</tt>, while file copy destinations are relative to the root of the resulting bundle JAR file. In the case of <tt>assignment</tt> or <tt>simple</tt> forms, the <tt>PATH</tt> parameter can point to a file or directory. The <tt>simple</tt> |
| 165 | form will place the resource in the bundle JAR with only the file name, |
| 166 | i.e., without any path component. For example, including <tt>src/main/resources/a/b.c</tt> will result in a resource <tt>b.c</tt> in the root of the bundle JAR. If the <tt>PATH</tt> |
| 167 | points to a directory, the entire directory hierarchy is copied into |
| 168 | the resulting bundle JAR file relative to the specified directory. If a |
| 169 | specific resource must be placed into a subdirectory of the bundle jar, |
| 170 | then use the <tt>assignment</tt> form, where the first path is the the |
| 171 | destination path (including file name if the resource is a file) and |
| 172 | the second path is the resource to copy. The <tt>inline</tt> form requires a ZIP or JAR file, which will be completely expanded in the bundle JAR.</p> |
| 173 | |
| 174 | <p>If a resource clause is specified inside of "{ ... }" brackets, then |
| 175 | variable substitution will be performed on the resource, where |
| 176 | variables in the resources are denoted with "${ ... }" syntax.</p> |
| 177 | |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 178 | <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> |
| 179 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 180 | <h3><a name="ApacheFelixMavenBundlePlugin(BND)-{{<ImportPackage>}}"></a><tt><Import-Package></tt></h3> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 181 | |
| 182 | <p>The <tt><Import-Package></tt> instruction is a list of |
| 183 | packages that are required by the bundle's contained packages. The |
| 184 | default for this header is "*", resulting in importing all referred |
| 185 | packages. This header rarely has to be explicitly specified. However, |
| 186 | in certain cases when there is an unwanted import, such an import can |
| 187 | be removed by using a negation package pattern. The package patterns |
| 188 | work in the same way as for <tt><Export-Package></tt>, which means they are ordered. For example, if you wanted to import all packages except <tt>org.foo.impl</tt> you would specify "<tt>!org.foo.impl,*</tt>"</p> |
| 189 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 190 | <p><a name="ApacheFelixMavenBundlePlugin(BND)-defaultbehavior"></a></p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 191 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 192 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-DefaultBehavior"></a>Default Behavior</h2> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 193 | |
| 194 | <p>To use this plugin, very little information is required by BND. As |
| 195 | part of the Maven integration, the plugin tries to set reasonable |
| 196 | defaults for various instructions. For example:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 197 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 198 | <ul> |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 199 | <li><tt><Bundle-SymbolicName></tt> is computed using the shared <span class="nobr"><a href="http://svn.apache.org/repos/asf/maven/shared/trunk/maven-osgi/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java" title="Visit page outside Confluence" rel="nofollow">Maven2OsgiConverter<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span> component, which uses the following algorithm:<br> |
| 200 | Get the symbolic name as groupId + "." + artifactId, with the following exceptions: |
| 201 | <ul> |
| 202 | <li>if |
| 203 | artifact.getFile is not null and the jar contains a OSGi Manifest with |
| 204 | Bundle-SymbolicName property then that value is returned</li> |
| 205 | <li>if |
| 206 | groupId has only one section (no dots) and artifact.getFile is not null |
| 207 | then the first package name with classes is returned. eg. |
| 208 | commons-logging:commons-logging -> org.apache.commons.logging</li> |
| 209 | <li>if artifactId is equal to last section of groupId then groupId is returned. eg. org.apache.maven:maven -> org.apache.maven</li> |
| 210 | <li>if |
| 211 | artifactId starts with last section of groupId that portion is removed. |
| 212 | eg. org.apache.maven:maven-core -> org.apache.maven.core</li> |
| 213 | </ul> |
| 214 | </li> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 215 | <li><tt><Export-Package></tt> is assumed to be "<tt><Bundle-SymbolicName>.*</tt>", unless <tt><Private-Package></tt> is specified, then <tt><Export-Package></tt> is assumed to be empty.</li> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 216 | <li><tt><Private-Package></tt> is assumed to be empty by default.</li> |
| 217 | <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> |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 218 | <li><tt><Include-Resource></tt> is generated from the project's Maven resources, typically "<tt>src/main/resources/</tt>", |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 219 | which will copy the specified project directory hierarchy into the |
| 220 | resulting bundle JAR file, mirroring standard Maven behavior.</li> |
| 221 | <li><tt><Bundle-Version></tt> is assumed to be "<tt>${pom.version</tt>}" with '-' character separator of the qualifier replaced with a '.' character.</li> |
| 222 | <li><tt><Bundle-Name></tt> is assumed to be "<tt>${pom.name</tt>}".</li> |
| 223 | <li><tt><Bundle-Description></tt> is assumed to be "<tt>${pom.description</tt>}".</li> |
| 224 | <li><tt><Bundle-License></tt> is assumed to be "<tt>${pom.licenses</tt>}".</li> |
| 225 | <li><tt><Bundle-Vendor></tt> is assumed to be "<tt>${pom.organization.name</tt>}".</li> |
| 226 | <li><tt><Bundle-DocURL></tt> is assumed to be "<tt>${pom.organization.url</tt>}".</li> |
| 227 | </ul> |
| 228 | |
| 229 | |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 230 | <p>Since the plugin creates bundles for OSGi R4, it hard-codes <tt>Bundle-ManifestVersion</tt> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 231 | to be '2'. Additionally, it generates imports for every export to |
| 232 | ensure package substitutability, which is very important when working |
| 233 | with collaborating services. It is possible to override any of these |
| 234 | values (except <tt>Bundle-ManifestVersion</tt>) just by specifying the desired value in the plugin configuration section of the POM file.</p> |
| 235 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 236 | <p><a name="ApacheFelixMavenBundlePlugin(BND)-howto"></a></p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 237 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 238 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-Detailed"HowTo""></a>Detailed "How To"</h1> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 239 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 240 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-GetMaven2"></a>Get Maven2</h2> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 241 | |
| 242 | <p>The first step in the process of using the plugin is downloading and |
| 243 | installing the latest version of the Maven2 runtime. The latest Maven2 |
| 244 | release and instuctions for getting started with Maven2 can be found at |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 245 | the <span class="nobr"><a href="http://maven.apache.org/index.html" title="Visit page outside Confluence" rel="nofollow">Maven website<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span>.</p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 246 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 247 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-UsingthePlugin"></a>Using the Plugin</h2> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 248 | |
| 249 | <p>To use the maven-bundle-plugin, you first need to add the plugin and |
| 250 | some appropriate plugin configuration to your bundle project's POM. |
| 251 | Below is an example of a simple OSGi bundle POM for Maven2:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 252 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 253 | <div class="preformatted"><div class="preformattedContent"> |
| 254 | <pre><project> |
| 255 | <modelVersion>4.0.0</modelVersion> |
| 256 | <groupId>my-osgi-bundles</groupId> |
| 257 | <artifactId>examplebundle</artifactId> |
| 258 | <packaging>bundle</packaging> <!-- (1) --> |
| 259 | <version>1.0</version> |
| 260 | <name>Example Bundle</name> |
| 261 | <dependencies> |
| 262 | <dependency> |
| 263 | <groupId>org.apache.felix</groupId> |
| 264 | <artifactId>org.osgi.core</artifactId> |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 265 | <version>1.0.0</version> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 266 | </dependency> |
| 267 | </dependencies> |
| 268 | <build> |
| 269 | <plugins> |
| 270 | <plugin> <!-- (2) START --> |
| 271 | <groupId>org.apache.felix</groupId> |
| 272 | <artifactId>maven-bundle-plugin</artifactId> |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 273 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 274 | <extensions>true</extensions> |
| 275 | <configuration> |
| 276 | <instructions> |
| 277 | <Export-Package>com.my.company.api</Export-Package> |
| 278 | <Private-Package>com.my.company.*</Private-Package> |
| 279 | <Bundle-Activator>com.my.company.Activator</Bundle-Activator> |
| 280 | </instructions> |
| 281 | </configuration> |
| 282 | </plugin> <!-- (2) END --> |
| 283 | </plugins> |
| 284 | </build> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 285 | </project> |
| 286 | </pre> |
| 287 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 288 | |
| 289 | <p>There are two main things to note: (1) the <tt><packaging></tt> |
| 290 | specifier must be "bundle" and (2) the plugin and configuration must be |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 291 | specified (the configuration section is where you will issue |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 292 | instructions to the plugin).</p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 293 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 294 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-RealWorldExample"></a>Real-World Example</h2> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 295 | |
| 296 | <p>Consider this more real-world example using Felix' Log Service |
| 297 | implementation. The Log Service project is comprised of a single |
| 298 | package: <tt>org.apache.felix.log.impl</tt>. It has a dependency on |
| 299 | the core OSGi interfaces as well as a dependency on the compendium OSGi |
| 300 | interfaces for the specific log service interfaces. The following is |
| 301 | its POM file:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 302 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 303 | <div class="preformatted"><div class="preformattedContent"> |
| 304 | <pre><project> |
| 305 | <modelVersion>4.0.0</modelVersion> |
| 306 | <groupId>org.apache.felix</groupId> |
| 307 | <artifactId>org.apache.felix.log</artifactId> |
| 308 | <packaging>bundle</packaging> |
| 309 | <name>Apache Felix Log Service</name> |
| 310 | <version>0.8.0-SNAPSHOT</version> |
| 311 | <description> |
| 312 | This bundle provides an implementation of the OSGi R4 Log service. |
| 313 | </description> |
| 314 | <dependencies> |
| 315 | <dependency> |
| 316 | <groupId>${pom.groupId}</groupId> |
| 317 | <artifactId>org.osgi.core</artifactId> |
| 318 | <version>0.8.0-incubator</version> |
| 319 | </dependency> |
| 320 | <dependency> |
| 321 | <groupId>${pom.groupId}</groupId> |
| 322 | <artifactId>org.osgi.compendium</artifactId> |
| 323 | <version>0.9.0-incubator-SNAPSHOT</version> |
| 324 | </dependency> |
| 325 | </dependencies> |
| 326 | <build> |
| 327 | <plugins> |
| 328 | <plugin> |
| 329 | <groupId>org.apache.felix</groupId> |
| 330 | <artifactId>maven-bundle-plugin</artifactId> |
| 331 | <extensions>true</extensions> |
| 332 | <configuration> |
| 333 | <instructions> |
| 334 | <Export-Package>org.osgi.service.log</Export-Package> |
| 335 | <Private-Package>org.apache.felix.log.impl</Private-Package> |
| 336 | <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName> |
| 337 | <Bundle-Activator>${pom.artifactId}.impl.Activator</Bundle-Activator> |
| 338 | <Export-Service>org.osgi.service.log.LogService,org.osgi.service.log.LogReaderService</Export-Service> |
| 339 | </instructions> |
| 340 | </configuration> |
| 341 | </plugin> |
| 342 | </plugins> |
| 343 | </build> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 344 | </project> |
| 345 | </pre> |
| 346 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 347 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 348 | <p>Notice that the <tt><Export-Package></tt> instruction |
| 349 | specifies that the bundle exports the Log Service package, even though |
| 350 | this package is not contained in the bundle project. By declaring this, |
| 351 | the plugin will copy the Log Service package into the resulting bundle |
| 352 | JAR file. This is useful in this case because now the bundle can |
| 353 | resolve without having to download the entire compendium bundle. The |
| 354 | resulting manifest for the Log Service bundle looks like this (notice |
| 355 | how the imports/exports automatically have version information |
| 356 | associated with them, which was obtained from packageinfo files in the |
| 357 | source packages):</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 358 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 359 | <div class="preformatted"><div class="preformattedContent"> |
| 360 | <pre>Manifest-Version: 1 |
| 361 | Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt |
| 362 | Bundle-Activator: org.apache.felix.log.impl.Activator |
| 363 | Import-Package: org.osgi.framework;version=1.3, org.osgi.service.log;v |
| 364 | ersion=1.3 |
| 365 | Include-Resource: src/main/resources |
| 366 | Export-Package: org.osgi.service.log;uses:=org.osgi.framework;version= |
| 367 | 1.3 |
| 368 | Bundle-Version: 0.8.0.SNAPSHOT |
| 369 | Bundle-Name: Apache Felix Log Service |
| 370 | Bundle-Description: This bundle provides an implementation of the OSGi |
| 371 | R4 Log service. |
| 372 | Private-Package: org.apache.felix.log.impl |
| 373 | Bundle-ManifestVersion: 2 |
| 374 | Export-Service: org.osgi.service.log.LogService,org.osgi.service.log.L |
| 375 | ogReaderService |
| 376 | Bundle-SymbolicName: org.apache.felix.log |
| 377 | </pre> |
| 378 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 379 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 380 | <p>The resulting bundle JAR file has the following content (notice how |
| 381 | the LICENSE and NOTICE files were automatically copied from the <tt>src/main/resources/</tt> directory of the project):</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 382 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 383 | <div class="preformatted"><div class="preformattedContent"> |
| 384 | <pre>META-INF/MANIFEST.MF |
| 385 | LICENSE |
| 386 | META-INF/ |
| 387 | META-INF/maven/ |
| 388 | META-INF/maven/org.apache.felix/ |
| 389 | META-INF/maven/org.apache.felix/org.apache.felix.log/ |
| 390 | META-INF/maven/org.apache.felix/org.apache.felix.log/pom.properties |
| 391 | META-INF/maven/org.apache.felix/org.apache.felix.log/pom.xml |
| 392 | NOTICE |
| 393 | org/ |
| 394 | org/apache/ |
| 395 | org/apache/felix/ |
| 396 | org/apache/felix/log/ |
| 397 | org/apache/felix/log/impl/ |
| 398 | org/apache/felix/log/impl/Activator.class |
| 399 | org/apache/felix/log/impl/Log.class |
| 400 | org/apache/felix/log/impl/LogEntryImpl.class |
| 401 | org/apache/felix/log/impl/LogException.class |
| 402 | org/apache/felix/log/impl/LogListenerThread.class |
| 403 | org/apache/felix/log/impl/LogNode.class |
| 404 | org/apache/felix/log/impl/LogNodeEnumeration.class |
| 405 | org/apache/felix/log/impl/LogReaderServiceFactory.class |
| 406 | org/apache/felix/log/impl/LogReaderServiceImpl.class |
| 407 | org/apache/felix/log/impl/LogServiceFactory.class |
| 408 | org/apache/felix/log/impl/LogServiceImpl.class |
| 409 | org/osgi/ |
| 410 | org/osgi/service/ |
| 411 | org/osgi/service/log/ |
| 412 | org/osgi/service/log/LogEntry.class |
| 413 | org/osgi/service/log/LogListener.class |
| 414 | org/osgi/service/log/LogReaderService.class |
| 415 | org/osgi/service/log/LogService.class |
| 416 | org/osgi/service/log/package.html |
| 417 | org/osgi/service/log/packageinfo |
| 418 | </pre> |
| 419 | </div></div> |
| 420 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 421 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-AddingOSGimetadatatoexistingprojectswithoutchangingthepackagingtype"></a>Adding OSGi metadata to existing projects without changing the packaging type</h2> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 422 | |
| 423 | <p>If you want to keep your project packaging type (for example "jar") but would like to add OSGi metadata<br> |
| 424 | you can use the manifest goal to generate a bundle manifest. The maven-jar-plugin can then be used to<br> |
| 425 | add this manifest to the final artifact. For example:</p> |
| 426 | |
| 427 | <div class="code"><div class="codeContent"> |
| 428 | <pre class="code-xml"><span class="code-tag"><plugin></span> |
| 429 | <span class="code-tag"><artifactId></span>maven-jar-plugin<span class="code-tag"></artifactId></span> |
| 430 | <span class="code-tag"><configuration></span> |
| 431 | <span class="code-tag"><archive></span> |
| 432 | <span class="code-tag"><manifestFile></span>${project.build.outputDirectory}/META-INF/MANIFEST.MF<span class="code-tag"></manifestFile></span> |
| 433 | <span class="code-tag"></archive></span> |
| 434 | <span class="code-tag"></configuration></span> |
| 435 | <span class="code-tag"></plugin></span> |
| 436 | <span class="code-tag"><plugin></span> |
| 437 | <span class="code-tag"><groupId></span>org.apache.felix<span class="code-tag"></groupId></span> |
| 438 | <span class="code-tag"><artifactId></span>maven-bundle-plugin<span class="code-tag"></artifactId></span> |
| 439 | <span class="code-tag"><executions></span> |
| 440 | <span class="code-tag"><execution></span> |
| 441 | <span class="code-tag"><id></span>bundle-manifest<span class="code-tag"></id></span> |
| 442 | <span class="code-tag"><phase></span>process-classes<span class="code-tag"></phase></span> |
| 443 | <span class="code-tag"><goals></span> |
| 444 | <span class="code-tag"><goal></span>manifest<span class="code-tag"></goal></span> |
| 445 | <span class="code-tag"></goals></span> |
| 446 | <span class="code-tag"></execution></span> |
| 447 | <span class="code-tag"></executions></span> |
| 448 | <span class="code-tag"></plugin></span></pre> |
| 449 | </div></div> |
| 450 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 451 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-BuildingthePlugin"></a>Building the Plugin</h2> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 452 | |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 453 | <p>The plugin is hosted at the Apache Felix project. The following |
| 454 | steps describe how to build and install the plugin into your local |
| 455 | Maven2 repository.</p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 456 | |
| 457 | <p>Using the SVN client of your choice, checkout the maven-bundle-plugin project.</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 458 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 459 | <div class="preformatted"><div class="preformattedContent"> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 460 | <pre>$ svn co http://svn.apache.org/repos/asf/felix/trunk/bundleplugin |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 461 | </pre> |
| 462 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 463 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 464 | <p>Using Maven2, build and install the maven-bundle-plugin by issuing |
| 465 | the following Maven2 command in the project directory that was created |
| 466 | as a result of the previous step.</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 467 | |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 468 | <div class="preformatted"><div class="preformattedContent"> |
| 469 | <pre>$ mvn install |
| 470 | </pre> |
| 471 | </div></div> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 472 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 473 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-Goals"></a>Goals</h1> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 474 | |
| 475 | <p>The maven-bundle-plugin also provides additional functionality via |
| 476 | some Maven goals. Command-line execution of a goal is performed as |
| 477 | follows:</p> |
| 478 | |
| 479 | <div class="preformatted"><div class="preformattedContent"> |
| 480 | <pre>mvn org.apache.felix:maven-bundle-plugin:GOAL |
| 481 | </pre> |
| 482 | </div></div> |
| 483 | |
| 484 | <p>Where GOAL is one of the following:</p> |
| 485 | |
| 486 | <ul> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 487 | <li><b><tt>bundle</tt></b> - build an OSGi bundle jar for the current project<br> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 488 | configuration options: |
| 489 | <ul> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 490 | <li><em><tt>manifestLocation</tt></em> defaults to ${project.build.outputDirectory}/META-INF</li> |
| 491 | <li><em><tt>unpackBundle</tt></em> unpack bundle contents to output directory, defaults to false</li> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 492 | <li><em><tt>excludeDependencies</tt></em> comma-separated list of dependency artifactIds to exclude from the classpath passed to Bnd (use "true" to exclude everything)</li> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 493 | <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 494 | <li><em><tt>classifier</tt></em> attach bundle to the project using the given classifier</li> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 495 | </ul> |
| 496 | </li> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 497 | </ul> |
| 498 | |
| 499 | |
| 500 | <ul> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 501 | <li><b><tt>bundleall</tt></b> - build OSGi bundle jars for all transitive dependencies<br> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 502 | configuration options: |
| 503 | <ul> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 504 | <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li> |
Stuart McCulloch | 5f3ddf7 | 2008-05-03 12:49:39 +0000 | [diff] [blame] | 505 | <li><em><tt>wrapImportPackage</tt></em> defaults to "*"</li> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 506 | </ul> |
| 507 | </li> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 508 | </ul> |
| 509 | |
| 510 | |
| 511 | <ul> |
| 512 | <li><b><tt>wrap</tt></b> - as above, but limited to the first level of dependencies<br> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 513 | configuration options: |
| 514 | <ul> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 515 | <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li> |
Stuart McCulloch | 5f3ddf7 | 2008-05-03 12:49:39 +0000 | [diff] [blame] | 516 | <li><em><tt>wrapImportPackage</tt></em> defaults to "*"</li> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 517 | </ul> |
| 518 | </li> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 519 | </ul> |
| 520 | |
| 521 | |
| 522 | <ul> |
| 523 | <li><b><tt>manifest</tt></b> - create an OSGi manifest for the current project<br> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 524 | configuration options: |
| 525 | <ul> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 526 | <li><em><tt>manifestLocation</tt></em> defaults to ${project.build.outputDirectory}/META-INF</li> |
| 527 | <li><em><tt>supportedProjectTypes</tt></em> defaults to "jar","bundle"</li> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 528 | </ul> |
| 529 | </li> |
| 530 | </ul> |
| 531 | |
| 532 | |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 533 | <ul> |
| 534 | <li><b><tt>install</tt></b> - adds the current bundle project to the local OBR<br> |
| 535 | configuration options: |
| 536 | <ul> |
| 537 | <li><em><tt>obrRepository</tt></em> path to local OBR, defaults to <em><local-maven-repository></em><tt>/repository.xml</tt></li> |
| 538 | </ul> |
| 539 | </li> |
| 540 | </ul> |
| 541 | |
| 542 | |
| 543 | <p>More GOALs are available in the <b>1.4.0</b> release:</p> |
| 544 | |
| 545 | <ul> |
| 546 | <li><b><tt>ant</tt></b> - create an Ant build script to rebuild the bundle</li> |
| 547 | </ul> |
| 548 | |
| 549 | |
| 550 | <ul> |
| 551 | <li><b><tt>install-file</tt></b> - adds a local bundle file to the local OBR<br> |
| 552 | configuration options: |
| 553 | <ul> |
| 554 | <li><em><tt>obrRepository</tt></em> path to local OBR, defaults to <em><local-maven-repository></em><tt>/repository.xml</tt></li> |
| 555 | <li><em><tt>groupId</tt></em> Maven groupId for the bundle, taken from <em>pomFile</em> if given</li> |
| 556 | <li><em><tt>artifactId</tt></em> Maven artifactId for the bundle, taken from <em>pomFile</em> if given</li> |
| 557 | <li><em><tt>version</tt></em> Maven version for the bundle, taken from <em>pomFile</em> if given</li> |
| 558 | <li><em><tt>packaging</tt></em> Maven packaging type for the bundle, taken from <em>pomFile</em> if given</li> |
| 559 | <li><em><tt>classifier</tt></em> Maven classifier type, defaults to none</li> |
| 560 | <li><em><tt>pomFile</tt></em> optional Pom file describing the bundle</li> |
| 561 | <li><em><tt>file</tt></em> bundle file, defaults to the bundle from the local Maven repository</li> |
| 562 | <li><em><tt>obrXml</tt></em> optional additional properties for the bundle</li> |
| 563 | </ul> |
| 564 | </li> |
| 565 | </ul> |
| 566 | |
| 567 | |
| 568 | <ul> |
| 569 | <li><b><tt>deploy</tt></b> - adds the current bundle project to a remote OBR<br> |
| 570 | configuration options: |
| 571 | <ul> |
| 572 | <li><em><tt>remoteOBR</tt></em> name of remote OBR, defaults to NONE (which means no remote OBR deployment)</li> |
| 573 | <li><em><tt>obrRepository</tt></em> used when the remoteOBR name is blank, defaults to <tt>repository.xml</tt></li> |
| 574 | <li><em><tt>altDeploymentRepository</tt></em> alternative remote repository, <em>id::layout::url</em></li> |
| 575 | <li><em><tt>ignoreLock</tt></em> ignore remote locking when updating the OBR</li> |
| 576 | </ul> |
| 577 | </li> |
| 578 | </ul> |
| 579 | |
| 580 | |
| 581 | <ul> |
| 582 | <li><b><tt>deploy-file</tt></b> - adds a local bundle file to a remote OBR<br> |
| 583 | configuration options: |
| 584 | <ul> |
| 585 | <li><em><tt>remoteOBR</tt></em> name of remote OBR, defaults to an empty string</li> |
| 586 | <li><em><tt>obrRepository</tt></em> used when the remoteOBR name is blank, defaults to <tt>repository.xml</tt></li> |
| 587 | <li><em><tt>repositoryId</tt></em> optional repository id, used to lookup authentication settings</li> |
| 588 | <li><em><tt>url</tt></em> remote repository transport URL, like |
| 589 | <div class="preformatted"><div class="preformattedContent"> |
| 590 | <pre>scpexe://host/path/to/obr |
| 591 | </pre> |
| 592 | </div></div></li> |
| 593 | <li><em><tt>bundleUrl</tt></em> public URL of deployed bundle, like |
| 594 | <div class="preformatted"><div class="preformattedContent"> |
| 595 | <pre>http://www.foo.org/bundles/foo.jar |
| 596 | </pre> |
| 597 | </div></div></li> |
| 598 | <li><em><tt>groupId</tt></em> Maven groupId for the bundle, taken from <em>pomFile</em> if given</li> |
| 599 | <li><em><tt>artifactId</tt></em> Maven artifactId for the bundle, taken from <em>pomFile</em> if given</li> |
| 600 | <li><em><tt>version</tt></em> Maven version for the bundle, taken from <em>pomFile</em> if given</li> |
| 601 | <li><em><tt>packaging</tt></em> Maven packaging type for the bundle, taken from <em>pomFile</em> if given</li> |
| 602 | <li><em><tt>classifier</tt></em> Maven classifier type, defaults to none</li> |
| 603 | <li><em><tt>pomFile</tt></em> optional Pom file describing the bundle</li> |
| 604 | <li><em><tt>file</tt></em> bundle file, defaults to the bundle from the local Maven repository</li> |
| 605 | <li><em><tt>obrXml</tt></em> optional additional properties for the bundle</li> |
| 606 | <li><em><tt>ignoreLock</tt></em> ignore remote locking when updating the OBR</li> |
| 607 | </ul> |
| 608 | </li> |
| 609 | </ul> |
| 610 | |
| 611 | |
| 612 | <ul> |
| 613 | <li><b><tt>clean</tt></b> - cleans the local OBR, removing missing bundles<br> |
| 614 | configuration options: |
| 615 | <ul> |
| 616 | <li><em><tt>obrRepository</tt></em> path to local OBR, defaults to <em><local-maven-repository></em><tt>/repository.xml</tt></li> |
| 617 | </ul> |
| 618 | </li> |
| 619 | </ul> |
| 620 | |
| 621 | |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 622 | <p>There are also new instructions available from the underlying BND |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 623 | 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="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span>.</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 624 | |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 625 | <p>The default goal <b><tt>bundle</tt></b> will be initialized by setting the <packaging> entry to "bundle".</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 626 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 627 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-Thefollowingfeaturesareonlyavailablefromversion1.2.0onwards"></a>The following features are only available from version 1.2.0 onwards</h1> |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 628 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 629 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-Embeddingdependencies"></a>Embedding dependencies</h2> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 630 | |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 631 | <p>The Maven Bundle Plugin supports embedding of selected project dependencies inside the bundle by using the <tt><Embed-Dependency></tt> instruction:</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 632 | |
| 633 | <div class="code"><div class="codeContent"> |
| 634 | <pre class="code-xml"><span class="code-tag"><Embed-Dependency></span>dependencies<span class="code-tag"></Embed-Dependency></span></pre> |
| 635 | </div></div> |
| 636 | |
| 637 | <p>where:</p> |
| 638 | |
| 639 | <div class="preformatted"><div class="preformattedContent"> |
| 640 | <pre>dependencies ::= clause ( ',' clause ) * |
| 641 | clause ::= MATCH ( ';' attr '=' MATCH | ';inline=true' ) |
| 642 | attr ::= 'groupId' | 'artifactId' | 'version' | 'scope' | 'type' | 'classifier' |
| 643 | MATCH ::= <globbed regular expressions> |
| 644 | </pre> |
| 645 | </div></div> |
| 646 | |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 647 | <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> |
| 648 | clauses, which are then appended to the current set of instructions and |
| 649 | passed onto BND. If you want the embedded dependencies to be at the |
| 650 | start or middle of <tt><Include-Resource></tt> or <tt><Bundle-ClassPath></tt> then you can use {<tt>maven-dependencies</tt>}, which will automatically expand to the relevant clauses.</p> |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 651 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 652 | <p>The MATCH section accepts alternatives, separated by <b>|</b>, and can be negated by using <b>!</b> at the <em>beginning</em> of the MATCH. Use <b>*</b> to represent zero or more unknown characters and <b>?</b> to represent a single unknown character. There is no need to escape the <b>.</b> character inside MATCH. The first MATCH in a clause will filter against the artifactId.</p> |
| 653 | |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 654 | <p>some examples:</p> |
| 655 | |
| 656 | <div class="code"><div class="codeContent"> |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 657 | <pre class="code-xml"><span class="code-tag"><span class="code-comment"><!-- embed all compile and runtime scope dependencies --></span></span> |
| 658 | <span class="code-tag"><Embed-Dependency></span>*;scope=compile|runtime<span class="code-tag"></Embed-Dependency></span> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 659 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 660 | <span class="code-tag"><span class="code-comment"><!-- embed any dependencies with artifactId junit and scope test --></span></span> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 661 | <span class="code-tag"><Embed-Dependency></span>junit;scope=test<span class="code-tag"></Embed-Dependency></span> |
| 662 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 663 | <span class="code-tag"><span class="code-comment"><!-- inline all dependencies, except those with scope test --></span></span> |
| 664 | <span class="code-tag"><Embed-Dependency></span>*;scope=!test;inline=true<span class="code-tag"></Embed-Dependency></span> |
| 665 | |
| 666 | <span class="code-tag"><span class="code-comment"><!-- embed all compile and runtime scope dependencies, except those with artifactIds in the given list --></span></span> |
| 667 | <span class="code-tag"><Embed-Dependency></span>*;scope=compile|runtime;inline=false;artifactId=!cli|lang|runtime|tidy|jsch<span class="code-tag"></Embed-Dependency></span></pre> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 668 | </div></div> |
| 669 | |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 670 | <p>examples of using {<tt>maven-dependencies</tt>}:</p> |
| 671 | |
| 672 | <div class="code"><div class="codeContent"> |
| 673 | <pre class="code-xml"><span class="code-tag"><Include-Resource></span> |
| 674 | {maven-resources}, {maven-dependencies}, |
| 675 | org/foo/Example.class=target/classes/org/foo/Example.class |
| 676 | <span class="code-tag"></Include-Resource></span> |
| 677 | |
| 678 | <span class="code-tag"><Bundle-ClassPath></span>.,{maven-dependencies},some.jar<span class="code-tag"></Bundle-ClassPath></span></pre> |
| 679 | </div></div> |
| 680 | |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 681 | <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> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 682 | |
| 683 | <ul> |
| 684 | <li><tt><Embed-StripVersion>true</Embed-StripVersion></tt> - removes the version from the file (ie. <em>artifactId.jar</em>)</li> |
| 685 | <li><tt><Embed-StripGroup>false</Embed-StripGroup></tt> - adds the groupId as a subdirectory (ie. <em>groupId/artifactId-version.jar</em>)</li> |
| 686 | <li><tt><Embed-Directory>directory</Embed-Directory></tt> - adds a subdirectory (ie. <em>directory/artifactId-version.jar</em>)</li> |
| 687 | </ul> |
| 688 | |
| 689 | |
| 690 | <p>Normally the plugin only checks direct dependencies, but this can be |
| 691 | changed to include the complete set of transitive dependencies with the |
| 692 | following option:</p> |
| 693 | |
| 694 | <div class="code"><div class="codeContent"> |
| 695 | <pre class="code-xml"><span class="code-tag"><Embed-Transitive></span>true<span class="code-tag"></Embed-Transitive></span></pre> |
| 696 | </div></div> |
| 697 | |
| 698 | <p>If you want a dependency inlined instead of embedded add the <tt>inline=true</tt>. For example to inline all <em>compile</em> and <em>runtime</em> scoped dependencies use:</p> |
| 699 | |
| 700 | <div class="code"><div class="codeContent"> |
| 701 | <pre class="code-xml"><span class="code-tag"><Embed-Dependency></span>*;scope=compile|runtime;inline=true<span class="code-tag"></Embed-Dependency></span></pre> |
| 702 | </div></div> |
| 703 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 704 | <h3><a name="ApacheFelixMavenBundlePlugin(BND)-EmbedDependencyandExportPackage"></a>Embed-Dependency and Export-Package</h3> |
Stuart McCulloch | 7c961f5 | 2008-01-02 08:56:07 +0000 | [diff] [blame] | 705 | |
| 706 | <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> |
| 707 | instructions will result in classes being inlined in the bundle, even |
| 708 | though they also exist inside the embedded jar. If you want to export |
| 709 | packages from an embedded dependency without such duplication then you |
| 710 | can either inline the dependency, or use a new BND instruction called <tt><_exportcontents></tt>.</p> |
| 711 | |
| 712 | <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> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 713 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 714 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-OBRintegration"></a>OBR integration</h2> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 715 | |
| 716 | <p>The latest Maven Bundle Plugin automatically updates the local OBR |
| 717 | repository.xml file during the install phase, using a default location |
| 718 | of:</p> |
| 719 | |
| 720 | <div class="code"><div class="codeContent"> |
| 721 | <pre class="code-java"><LOCAL-MAVEN-REPOSITORY>/repository.xml</pre> |
| 722 | </div></div> |
| 723 | |
| 724 | <p>You can configure the location of the OBR repository by using the command line:</p> |
| 725 | |
| 726 | <div class="code"><div class="codeContent"> |
| 727 | <pre class="code-java">mvn clean install -DobrRepository=<PATH_TO_OBR></pre> |
| 728 | </div></div> |
| 729 | |
| 730 | <p>or in the configuration section for the maven-bundle-plugin in your Maven POM:</p> |
| 731 | |
| 732 | <div class="code"><div class="codeContent"> |
| 733 | <pre class="code-xml"><span class="code-tag"><groupId></span>org.apache.felix<span class="code-tag"></groupId></span> |
| 734 | <span class="code-tag"><artifactId></span>maven-bundle-plugin<span class="code-tag"></artifactId></span> |
| 735 | <span class="code-tag"><extensions></span>true<span class="code-tag"></extensions></span> |
| 736 | <span class="code-tag"><configuration></span> |
| 737 | <span class="code-tag"><obrRepository></span>PATH_TO_OBR<span class="code-tag"></obrRepository></span> |
| 738 | <span class="code-tag"><instructions></span> |
| 739 | <span class="code-tag"><span class="code-comment"><!-- bnd instructions --></span></span> |
| 740 | <span class="code-tag"></instructions></span> |
| 741 | <span class="code-tag"></configuration></span></pre> |
| 742 | </div></div> |
| 743 | |
| 744 | <p>to disable OBR installation set the obrRepository to NONE, for example:</p> |
| 745 | |
| 746 | <div class="code"><div class="codeContent"> |
| 747 | <pre class="code-xml"><span class="code-tag"><groupId></span>org.apache.felix<span class="code-tag"></groupId></span> |
| 748 | <span class="code-tag"><artifactId></span>maven-bundle-plugin<span class="code-tag"></artifactId></span> |
| 749 | <span class="code-tag"><extensions></span>true<span class="code-tag"></extensions></span> |
| 750 | <span class="code-tag"><configuration></span> |
| 751 | <span class="code-tag"><obrRepository></span>NONE<span class="code-tag"></obrRepository></span> |
| 752 | <span class="code-tag"><instructions></span> |
| 753 | <span class="code-tag"><span class="code-comment"><!-- bnd instructions --></span></span> |
| 754 | <span class="code-tag"></instructions></span> |
| 755 | <span class="code-tag"></configuration></span></pre> |
| 756 | </div></div> |
| 757 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 758 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-Eclipse/PDEintegration"></a>Eclipse/PDE integration</h2> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 759 | |
| 760 | <p>It is possible to configure the Maven Bundle Plugin to put the |
| 761 | bundle manifest where Eclipse/PDE expects it, and use the Maven |
| 762 | Dependency Plugin to arrange for any embedded dependencies to appear in |
| 763 | a local directory that matches the Bundle-ClassPath entries. Here is an |
| 764 | example POM that does this:</p> |
| 765 | |
| 766 | <div class="preformatted"><div class="preformattedContent"> |
| 767 | <pre><project> |
| 768 | |
| 769 | <properties> |
| 770 | <bundle.symbolicName>org.example</bundle.symbolicName> |
| 771 | <bundle.namespace>org.example</bundle.namespace> |
| 772 | </properties> |
| 773 | |
| 774 | <modelVersion>4.0.0</modelVersion> |
| 775 | <groupId>examples</groupId> |
| 776 | <artifactId>org.example</artifactId> |
| 777 | <version>1.0-SNAPSHOT</version> |
| 778 | |
| 779 | <name>${bundle.symbolicName} [${bundle.namespace}]</name> |
| 780 | |
| 781 | <packaging>bundle</packaging> |
| 782 | |
| 783 | <build> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 784 | <resources> |
| 785 | <resource> |
| 786 | <directory>src/main/resources</directory> |
| 787 | </resource> |
| 788 | <resource> |
| 789 | <directory>.</directory> |
| 790 | <includes> |
| 791 | <include>plugin.xml</include> |
| 792 | </includes> |
| 793 | </resource> |
| 794 | </resources> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 795 | <plugins> |
| 796 | <plugin> |
| 797 | <groupId>org.apache.felix</groupId> |
| 798 | <artifactId>maven-bundle-plugin</artifactId> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 799 | <version>1.2.1</version> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 800 | <extensions>true</extensions> |
| 801 | <!-- |
| 802 | the following instructions build a simple set of public/private classes into an OSGi bundle |
| 803 | --> |
| 804 | <configuration> |
| 805 | <manifestLocation>META-INF</manifestLocation> |
| 806 | <instructions> |
| 807 | <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> |
| 808 | <Bundle-Version>${pom.version}</Bundle-Version> |
| 809 | <!-- |
| 810 | assume public classes are in the top package, and private classes are under ".internal" |
| 811 | --> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 812 | <Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"</Export-Package> |
| 813 | <Private-Package>${bundle.namespace}.internal.*</Private-Package> |
| 814 | <Bundle-Activator>${bundle.namespace}.internal.ExampleActivator</Bundle-Activator> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 815 | <!-- |
| 816 | embed compile/runtime dependencies using path that matches the copied dependency folder |
| 817 | --> |
| 818 | <Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency> |
| 819 | <Embed-Directory>target/dependency</Embed-Directory> |
| 820 | <Embed-StripGroup>true</Embed-StripGroup> |
| 821 | </instructions> |
| 822 | </configuration> |
| 823 | </plugin> |
| 824 | <plugin> |
| 825 | <artifactId>maven-dependency-plugin</artifactId> |
| 826 | <executions> |
| 827 | <execution> |
| 828 | <id>copy-dependencies</id> |
| 829 | <phase>package</phase> |
| 830 | <goals> |
| 831 | <goal>copy-dependencies</goal> |
| 832 | </goals> |
| 833 | </execution> |
| 834 | </executions> |
| 835 | </plugin> |
| 836 | </plugins> |
| 837 | </build> |
| 838 | |
| 839 | <dependencies> |
| 840 | <dependency> |
| 841 | <groupId>org.osgi</groupId> |
| 842 | <artifactId>osgi_R4_core</artifactId> |
| 843 | <version>1.0</version> |
| 844 | <scope>provided</scope> |
| 845 | <optional>true</optional> |
| 846 | </dependency> |
| 847 | <dependency> |
| 848 | <groupId>org.osgi</groupId> |
| 849 | <artifactId>osgi_R4_compendium</artifactId> |
| 850 | <version>1.0</version> |
| 851 | <scope>provided</scope> |
| 852 | <optional>true</optional> |
| 853 | </dependency> |
| 854 | <dependency> |
| 855 | <groupId>junit</groupId> |
| 856 | <artifactId>junit</artifactId> |
| 857 | <version>3.8.1</version> |
| 858 | <scope>compile</scope> |
| 859 | <optional>true</optional> |
| 860 | </dependency> |
| 861 | </dependencies> |
| 862 | |
| 863 | </project> |
| 864 | </pre> |
| 865 | </div></div> |
| 866 | |
| 867 | <p>To generate the Eclipse metadata use:</p> |
| 868 | |
| 869 | <div class="code"><div class="codeContent"> |
| 870 | <pre class="code-java">mvn clean <span class="code-keyword">package</span> eclipse:eclipse -Declipse.pde install</pre> |
| 871 | </div></div> |
| 872 | |
| 873 | <p>and you should now be able to import this as an existing Eclipse project.</p> |
| 874 | |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 875 | <p>FYI: the above POM was generated using the <tt>pax-create-bundle</tt> command from <span class="nobr"><a href="http://www.ops4j.org/projects/pax/construct/index.html" title="Visit page outside Confluence" rel="nofollow">Pax-Construct<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span> and then tweaked to demonstrate using the Maven Dependency Plugin to handle embedded jars in Eclipse.</p> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 876 | |
| 877 | <p>With the original Pax-Construct generated POM you would simply use:</p> |
| 878 | |
| 879 | <div class="code"><div class="codeContent"> |
| 880 | <pre class="code-java">mvn clean <span class="code-keyword">package</span> pax:eclipse</pre> |
| 881 | </div></div> |
| 882 | |
| 883 | <p>to create the appropriate Eclipse files and manifest, and also |
| 884 | handle any embedded entries. The pax:eclipse goal extends |
| 885 | eclipse:eclipse, and supports the same parameters.</p> |
| 886 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 887 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-Unpackingbundlecontentsto'target/classes'"></a>Unpacking bundle contents to 'target/classes'</h2> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 888 | |
| 889 | <p>Once in a while you may create a bundle which contains additional classes to the ones compiled from <tt>src/main/java</tt>, |
| 890 | for example when you embed the classes from another jar. This can |
| 891 | sometimes cause unforeseen problems in Maven, as it will use the output |
| 892 | directory (<tt>target/classes</tt>) rather than the final bundle, when compiling against projects in the same reactor (ie. the same build).</p> |
| 893 | |
| 894 | <p>The easiest way to get around this Maven 'feature' is to unpack the |
| 895 | contents of the bundle to the output directory after the packaging |
| 896 | step, so the additional classes will be found where Maven expects them. |
| 897 | Thankfully there is now an easy option to do this in the bundle-plugin:</p> |
| 898 | |
| 899 | <div class="code"><div class="codeContent"> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 900 | <pre class="code-xml"><span class="code-tag"><groupId></span>org.apache.felix<span class="code-tag"></groupId></span> |
| 901 | <span class="code-tag"><artifactId></span>maven-bundle-plugin<span class="code-tag"></artifactId></span> |
| 902 | <span class="code-tag"><extensions></span>true<span class="code-tag"></extensions></span> |
| 903 | <span class="code-tag"><configuration></span> |
| 904 | <span class="code-tag"><unpackBundle></span>true<span class="code-tag"></unpackBundle></span> |
| 905 | <span class="code-tag"><instructions></span> |
| 906 | <span class="code-tag"><span class="code-comment"><!-- bnd instructions --></span></span> |
| 907 | <span class="code-tag"></instructions></span> |
| 908 | <span class="code-tag"></configuration></span></pre> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 909 | </div></div> |
| 910 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 911 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-UsinganexistingMANIFEST.MFfile"></a>Using an existing MANIFEST.MF file</h2> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 912 | |
| 913 | <p>If you have an existing manifest, you can add this to the Bnd instructions, like so:</p> |
| 914 | |
| 915 | <div class="code"><div class="codeContent"> |
Stuart McCulloch | dd4ae5f | 2008-02-05 12:38:46 +0000 | [diff] [blame] | 916 | <pre class="code-xml"><span class="code-tag"><_include></span>src/main/resources/META-INF/MANIFEST.MF<span class="code-tag"></_include></span> |
| 917 | <span class="code-tag"><Export-Package></span>org.example.*<span class="code-tag"></Export-Package></span></pre> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 918 | </div></div> |
| 919 | |
| 920 | <p>Bnd will use it when calculating the bundle contents, and will also |
| 921 | copy across all manifest attributes starting with a capital letter.<br> |
| 922 | As shown in the above example, you could use this to include a non-OSGi |
| 923 | manifest which you then customize with extra OSGi attributes.</p> |
| 924 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 925 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-Thefollowingfeaturesareonlyavailablefromversion1.4.0onwards"></a>The following features are only available from version 1.4.0 onwards</h1> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 926 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 927 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-bundle:ant"></a>bundle:ant</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 928 | |
| 929 | <p>The <b>ant</b> goal creates a customized <tt>build.xml</tt> Ant script along with a collection of BND instructions and properties, taken from the current project and stored in <tt>maven-build.bnd</tt>. You also need to run <b><tt>ant:ant</tt></b> to create the standard Ant support tasks to download Maven dependencies and perform compilation, etc.</p> |
| 930 | |
| 931 | <p>The customized Ant script uses the BND tool to rebuild the bundle, |
| 932 | so any source changes should be reflected in the (re)generated manifest.</p> |
| 933 | |
| 934 | <p>Example:</p> |
| 935 | <div class="preformatted"><div class="preformattedContent"> |
| 936 | <pre>mvn ant:ant bundle:ant |
| 937 | |
| 938 | ant clean package |
| 939 | </pre> |
| 940 | </div></div> |
| 941 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 942 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-bundle:installfile"></a>bundle:install-file</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 943 | |
| 944 | <p>The <b>install-file</b> goal updates the local OBR with the details of a bundle from the local filesystem.</p> |
| 945 | |
| 946 | <p>configuration:</p> |
| 947 | <ul> |
| 948 | <li><em>obrRepository</em> path to local OBR, defaults to <em><local-maven-repository></em><tt>/repository.xml</tt></li> |
| 949 | <li><em>groupId</em> Maven groupId for the bundle, taken from <em>pomFile</em> if given</li> |
| 950 | <li><em>artifactId</em> Maven artifactId for the bundle, taken from <em>pomFile</em> if given</li> |
| 951 | <li><em>version</em> Maven version for the bundle, taken from <em>pomFile</em> if given</li> |
| 952 | <li><em>packaging</em> Maven packaging type for the bundle, taken from <em>pomFile</em> if given</li> |
| 953 | <li><em>classifier</em> Maven classifier type, defaults to none</li> |
| 954 | <li><em>pomFile</em> optional Pom file describing the bundle</li> |
| 955 | <li><em>file</em> bundle file, defaults to the bundle from the local Maven repository</li> |
| 956 | <li><em>obrXml</em> optional additional properties for the bundle</li> |
| 957 | </ul> |
| 958 | |
| 959 | |
| 960 | <p>Example:</p> |
| 961 | <div class="preformatted"><div class="preformattedContent"> |
| 962 | <pre>mvn org.apache.felix:maven-bundle-plugin:1.4.0:install-file \ |
| 963 | -DpomFile=myPom.xml -Dfile=foo-1.0.jar |
| 964 | </pre> |
| 965 | </div></div> |
| 966 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 967 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-bundle:deploy"></a>bundle:deploy</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 968 | |
| 969 | <p>The <b>deploy goal</b> updates the remote OBR with the details of |
| 970 | the deployed bundle from the local Maven repository. The remote OBR is |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 971 | found by querying the <tt><distributionManagement></tt> section of the project, unless <tt>-DaltDeploymentRepository</tt> is set. See <span class="nobr"><a href="http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html" title="Visit page outside Confluence" rel="nofollow">http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span> for more details about these particular settings.</p> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 972 | |
| 973 | <p>(If the project has an <tt>obr.xml</tt> file somewhere in its resources, then it will be automatically detected and applied.)</p> |
| 974 | |
| 975 | <p>configuration:</p> |
| 976 | <ul> |
| 977 | <li><em>remoteOBR</em> name of remote OBR, defaults to NONE (which means no remote OBR deployment)</li> |
| 978 | <li><em>obrRepository</em> used when the remoteOBR name is blank, defaults to <tt>repository.xml</tt></li> |
| 979 | <li><em>altDeploymentRepository</em> alternative remote repository, <em>id::layout::url</em></li> |
| 980 | <li><em>ignoreLock</em> ignore remote locking when updating the OBR</li> |
| 981 | </ul> |
| 982 | |
| 983 | |
| 984 | <p>This goal is part of the "bundle" packaging lifecycle, but is disabled by default - to enable just set the <tt>remoteOBR</tt> parameter.</p> |
| 985 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 986 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-bundle:deployfile"></a>bundle:deploy-file</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 987 | |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 988 | <p>The <b>deploy-file</b> goal updates the remote OBR with the details of a deployed bundle from the local filesystem. The remote OBR is found using the <tt>-DrepositoryId</tt> and <tt>-Durl</tt> parameters. See <span class="nobr"><a href="http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html" title="Visit page outside Confluence" rel="nofollow">http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/linkext7.gif" alt="" align="absmiddle" border="0" width="7" height="7"></sup></a></span> for more details about these particular settings.</p> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 989 | |
| 990 | <p>You can use the <tt>-DbundleUrl</tt> parameter to give the public location of the deployed bundle, which may differ from the remote OBR location.</p> |
| 991 | |
| 992 | <p>configuration:</p> |
| 993 | <ul> |
| 994 | <li><em>remoteOBR</em> name of remote OBR, defaults to an empty string</li> |
| 995 | <li><em>obrRepository</em> used when the remoteOBR name is blank, defaults to <tt>repository.xml</tt></li> |
| 996 | <li><em>repositoryId</em> optional repository id, used to lookup authentication settings</li> |
| 997 | <li><em>url</em> remote repository transport URL, like |
| 998 | <div class="preformatted"><div class="preformattedContent"> |
| 999 | <pre>scpexe://host/path/to/obr |
| 1000 | </pre> |
| 1001 | </div></div></li> |
| 1002 | <li><em>bundleUrl</em> public URL of deployed bundle, like |
| 1003 | <div class="preformatted"><div class="preformattedContent"> |
| 1004 | <pre>http://www.foo.org/bundles/foo.jar |
| 1005 | </pre> |
| 1006 | </div></div></li> |
| 1007 | <li><em>groupId</em> Maven groupId for the bundle, taken from <em>pomFile</em> if given</li> |
| 1008 | <li><em>artifactId</em> Maven artifactId for the bundle, taken from <em>pomFile</em> if given</li> |
| 1009 | <li><em>version</em> Maven version for the bundle, taken from <em>pomFile</em> if given</li> |
| 1010 | <li><em>packaging</em> Maven packaging type for the bundle, taken from <em>pomFile</em> if given</li> |
| 1011 | <li><em>classifier</em> Maven classifier type, defaults to none</li> |
| 1012 | <li><em>pomFile</em> optional Pom file describing the bundle</li> |
| 1013 | <li><em>file</em> bundle file, defaults to the bundle from the local Maven repository</li> |
| 1014 | <li><em>obrXml</em> optional additional properties for the bundle</li> |
| 1015 | <li><em>ignoreLock</em> ignore remote locking when updating the OBR</li> |
| 1016 | </ul> |
| 1017 | |
| 1018 | |
| 1019 | <p>Example:</p> |
| 1020 | <div class="preformatted"><div class="preformattedContent"> |
| 1021 | <pre>mvn org.apache.felix:maven-bundle-plugin:1.4.0:deploy-file \ |
| 1022 | -DpomFile=myPom.xml -Dfile=foo-1.0.jar -Durl=file:/tmp/example/OBR \ |
| 1023 | -DbundleUrl=http://www.foo.org/bundles/foo.jar |
| 1024 | </pre> |
| 1025 | </div></div> |
| 1026 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 1027 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-bundle:clean"></a>bundle:clean</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 1028 | |
| 1029 | <p>Sometimes you would like to clean your local OBR because it contains |
| 1030 | bundles that are no longer in your local Maven repository. This case |
| 1031 | often occurs when artifacts were deleted manually. The |
| 1032 | maven-bundle-plugin provides a simple goal to check for missing |
| 1033 | bundles, and remove them from the local OBR.</p> |
| 1034 | |
| 1035 | <p>configuration:</p> |
| 1036 | <ul> |
| 1037 | <li><em>obrRepository</em> path to local OBR, defaults to <em><local-maven-repository></em><tt>/repository.xml</tt></li> |
| 1038 | </ul> |
| 1039 | |
| 1040 | |
| 1041 | <p>Example:</p> |
| 1042 | <div class="preformatted"><div class="preformattedContent"> |
| 1043 | <pre>mvn bundle:clean |
| 1044 | </pre> |
| 1045 | </div></div> |
| 1046 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 1047 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-Concurrentupdates"></a>Concurrent updates</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 1048 | |
| 1049 | <p>With a remote OBR, several uploads may occur at the same time. |
| 1050 | However, the remote OBR is centralized in one file, so concurrent |
| 1051 | modification must be avoided. To achieve this, the plug-in implements a |
| 1052 | locking system. Each time the plug-in tries to modify the file it sets |
| 1053 | a file based lock. If it can't take the lock, it will wait and retry. |
| 1054 | After 3 attempts the upload process fails. To bypass this lock add <tt>-DignoreLock</tt> to the command-line (or add <tt><ignoreLock>true<ignoreLock></tt> to the configuration section of your Pom).</p> |
| 1055 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 1056 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-FTPprotocol"></a>FTP protocol</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 1057 | |
| 1058 | <p>Not all protocols are supported by Maven out of the box. For example the ftp protocol requires the <b>wagon-ftp</b> component. To enable the ftp protocol add this to your Pom:</p> |
| 1059 | <div class="code"><div class="codeContent"> |
| 1060 | <pre class="code-xml"><span class="code-tag"><build></span> |
| 1061 | <span class="code-tag"><extensions></span> |
| 1062 | <span class="code-tag"><extension></span> |
| 1063 | <span class="code-tag"><groupId></span>org.apache.maven.wagon<span class="code-tag"></groupId></span> |
| 1064 | <span class="code-tag"><artifactId></span>wagon-ftp<span class="code-tag"></artifactId></span> |
| 1065 | <span class="code-tag"><version></span>1.0-alpha-6<span class="code-tag"></version></span> |
| 1066 | <span class="code-tag"></extension></span> |
| 1067 | <span class="code-tag"></extensions></span> |
| 1068 | <span class="code-tag"></build></span></pre> |
| 1069 | </div></div> |
| 1070 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 1071 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-Howtheplugincomputesthedescriptionofthebundle"></a>How the plug-in computes the description of the bundle</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 1072 | |
| 1073 | <p>The description of the bundle comes from three different sources:</p> |
| 1074 | <ul> |
| 1075 | <li>Bindex : Bindex is a tool that analyzes a bundle manifest to generate OBR description</li> |
| 1076 | <li>pom.xml : by analyzing the pom file, various information is collected (symbolic name ...)</li> |
| 1077 | <li>obr.xml : this file contains customized description and capabilities for the bundle</li> |
| 1078 | </ul> |
| 1079 | |
| 1080 | |
| 1081 | <p>These sources are merged together using the following precedence:</p> |
| 1082 | <div class="preformatted"><div class="preformattedContent"> |
| 1083 | <pre>Bindex |
| 1084 | | (overrides) |
| 1085 | pom.xml |
| 1086 | | (overrides) |
| 1087 | obr.xml |
| 1088 | </pre> |
| 1089 | </div></div> |
| 1090 | <p>A warning message is displayed when existing information is overridden.</p> |
| 1091 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 1092 | <h2><a name="ApacheFelixMavenBundlePlugin(BND)-Knownissues&limitations"></a>Known issues & limitations</h2> |
Stuart McCulloch | 0340ae4 | 2008-02-22 11:27:18 +0000 | [diff] [blame] | 1093 | |
| 1094 | <ol> |
| 1095 | <li>obr.xml (file given by the user to add properties not found |
| 1096 | by Bindex) must be correct, because the plug-in does not check its |
| 1097 | syntax.</li> |
| 1098 | </ol> |
| 1099 | |
| 1100 | |
Stuart McCulloch | 3f38f73 | 2008-05-03 08:13:09 +0000 | [diff] [blame] | 1101 | <h1><a name="ApacheFelixMavenBundlePlugin(BND)-Feedback"></a>Feedback</h1> |
Stuart McCulloch | 93de649 | 2007-12-16 15:59:05 +0000 | [diff] [blame] | 1102 | |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 1103 | <p>Subscribe to the Felix users mailing list by sending a message to <span class="nobr"><a href="mailto:users-subscribe@felix.apache.org" title="Send mail to users-subscribe@felix.apache.org" rel="nofollow">users-subscribe@felix.apache.org<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/mail_small.gif" alt="" align="absmiddle" border="0" width="13" height="12"></sup></a></span>; after subscribing, email questions or feedback to <span class="nobr"><a href="mailto:users@felix.apache.org" title="Send mail to users@felix.apache.org" rel="nofollow">users@felix.apache.org<sup><img class="rendericon" src="apache-felix-maven-bundle-plugin-bnd_files/mail_small.gif" alt="" align="absmiddle" border="0" width="13" height="12"></sup></a></span>.</p> |
Karl Pauls | f87ac14 | 2007-07-06 22:36:17 +0000 | [diff] [blame] | 1104 | </div> |
Stuart McCulloch | e23ec84 | 2008-08-05 06:36:05 +0000 | [diff] [blame] | 1105 | </body></html> |