Richard S. Hall | 677f589 | 2007-07-10 15:29:11 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html><head><title>Apache Felix</title> |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | <link rel="stylesheet" href="apache-felix-osgi-bundle-repository-obr_files/site.css" type="text/css" media="all"> |
| 8 | <link rel="stylesheet" href="apache-felix-osgi-bundle-repository-obr_files/print.css" type="text/css" media="print"> |
| 9 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></head><body linkifytime="102" linkified="0" linkifying="false"> |
| 10 | <div class="title"> |
| 11 | <img alt="Logo" src="apache-felix-osgi-bundle-repository-obr_files/apache-felix-small.png" align="right"> |
| 12 | </div> |
| 13 | <div class="menu"> |
| 14 | <ul> |
| 15 | <li><a href="http://cwiki.apache.org/FELIX/index.html">home</a></li> |
| 16 | <li><a href="http://cwiki.apache.org/FELIX/news.html">news</a></li> |
| 17 | <li><a href="http://cwiki.apache.org/FELIX/status.html">status</a></li> |
| 18 | <li><a href="http://cwiki.apache.org/FELIX/license.html">license</a></li> |
| 19 | <li><a href="http://cwiki.apache.org/FELIX/downloads.html">downloads</a></li> |
| 20 | <li><a href="http://cwiki.apache.org/FELIX/documentation.html">documentation</a></li> |
| 21 | <li><a href="http://cwiki.apache.org/FELIX/committers.html">committers</a></li> |
| 22 | <li><a href="http://cwiki.apache.org/FELIX/mailinglists.html">mailing lists</a></li> |
| 23 | <li><a href="http://cwiki.apache.org/FELIX/faq.html">faq</a></li> |
| 24 | <li><a href="http://cwiki.apache.org/FELIX/roadmap.html">roadmap</a></li> |
| 25 | <li><a href="http://cwiki.apache.org/FELIX/sourcecode.html">source code</a></li> |
| 26 | <li><a href="http://cwiki.apache.org/FELIX/codingstandards.html">coding standards</a></li> |
| 27 | <li><a href="http://cwiki.apache.org/FELIX/issuetracking.html">issue tracking</a></li> |
| 28 | <li><a href="http://cwiki.apache.org/FELIX/dependencies.html">dependencies</a></li> |
| 29 | </ul> |
| 30 | </div> |
| 31 | <div class="main"> |
| 32 | <h1><a name="ApacheFelixOSGiBundleRepository(OBR)-ApacheFelixOSGiBundleRepository(OBR)"></a>Apache Felix OSGi Bundle Repository (OBR)</h1> |
| 33 | |
| 34 | <ul> |
| 35 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-motivation" title="motivation on Apache Felix OSGi Bundle Repository (OBR)">Motivation</a></li> |
| 36 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-overview" title="overview on Apache Felix OSGi Bundle Repository (OBR)">Overview</a></li> |
| 37 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-repositoryfile" title="repository-file on Apache Felix OSGi Bundle Repository (OBR)">OBR Repository File</a></li> |
| 38 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-serviceapi" title="service-api on Apache Felix OSGi Bundle Repository (OBR)">OBR Service API</a></li> |
| 39 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-shellcommand" title="shell-command on Apache Felix OSGi Bundle Repository (OBR)">OBR Shell Command</a> |
| 40 | <ul> |
| 41 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrhelp" title="obr-help on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr help</tt></a></li> |
| 42 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrlisturl" title="obr-list-url on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr list-url</tt></a></li> |
| 43 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obraddurl" title="obr-add-url on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr add-url</tt></a></li> |
| 44 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrremoveurl" title="obr-remove-url on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr remove-url</tt></a></li> |
| 45 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrlist" title="obr-list on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr list</tt></a></li> |
| 46 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrinfo" title="obr-info on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr info</tt></a></li> |
| 47 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrdeploy" title="obr-deploy on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr deploy</tt></a></li> |
| 48 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrstart" title="obr-start on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr start</tt></a></li> |
| 49 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrsource" title="obr-source on Apache Felix OSGi Bundle Repository (OBR)"><tt>obr source</tt></a></li> |
| 50 | </ul> |
| 51 | </li> |
| 52 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-proxy" title="proxy on Apache Felix OSGi Bundle Repository (OBR)">Using OBR with a Proxy</a></li> |
| 53 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-sourcepackaging" title="source-packaging on Apache Felix OSGi Bundle Repository (OBR)">Bundle Source Packaging</a></li> |
| 54 | <li><a href="#ApacheFelixOSGiBundleRepository%2528OBR%2529-feedback" title="feedback on Apache Felix OSGi Bundle Repository (OBR)">Feedback</a></li> |
| 55 | </ul> |
| 56 | |
| 57 | |
| 58 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-motivation"></a></p> |
| 59 | |
| 60 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-Motivation"></a>Motivation</h2> |
| 61 | |
| 62 | <p>The goal of the Apache Felix OSGi Bundle Repository (OBR) is two-fold:</p> |
| 63 | |
| 64 | <ol> |
| 65 | <li>To simplify deploying and using available bundles with Felix.</li> |
| 66 | <li>To encourage independent bundle development so that communities of interest can grow.</li> |
| 67 | </ol> |
| 68 | |
| 69 | |
| 70 | <p>OBR achieves the first goal by providing a service that can |
| 71 | automatically install a bundle, with its deployment dependencies, from |
| 72 | a bundle repository. This makes it easier for people to experiment with |
| 73 | existing bundles. The second goal is achieved by raising the visibility |
| 74 | of the available bundles and providing access to both the executable |
| 75 | bundle and its source code. Hopefully, by making OBR and the bundles |
| 76 | themselves more visible, community members will be encouraged to |
| 77 | provide or improve service implementations.</p> |
| 78 | |
| 79 | <p>Note: OBR provides access to the Felix' default bundle repository, |
| 80 | but you can also use it to deploy your own bundles by creating a bundle |
| 81 | repository meta-data file for your local bundles; see the <tt>obr list-url</tt>, <tt>obr add-url</tt>, and <tt>obr remove-url</tt> commands for more details.</p> |
| 82 | |
| 83 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-overview"></a></p> |
| 84 | |
| 85 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-Overview"></a>Overview</h2> |
| 86 | |
| 87 | <p>For the most part, OBR is quite simple. An OBR "repository server" |
| 88 | is not necessary, since all functionality may reside on the client |
| 89 | side. OBR is able to provide its functionality by reading an XML-based |
| 90 | meta-data file that describes the bundles available to it. The |
| 91 | meta-data file essentially contains an XML encoding of the bundles' |
| 92 | manifest information. From the meta-data, OBR is able to construct |
| 93 | dependency information for deploying (i.e., installing and updating) |
| 94 | bundles.</p> |
| 95 | |
| 96 | <p>OBR defines the following entities:</p> |
| 97 | |
| 98 | <ul> |
| 99 | <li><em><b>Repository Admin</b></em> - a service to access a federation of repositories.</li> |
| 100 | <li><em><b>Repository</b></em> - provides access to a set of resources.</li> |
| 101 | <li><em><b>Resource</b></em> - a description of an artifact to be installed on a device.</li> |
| 102 | <li><em><b>Capability</b></em> - a named set of properties.</li> |
| 103 | <li><em><b>Requirement</b></em> - an assertion on a capability.</li> |
| 104 | <li><em><b>Resolver</b></em> - an object to resolve resource dependencies and to deploy them.</li> |
| 105 | <li><em><b>Repository file</b></em> - XML file containing resource meta-data.</li> |
| 106 | </ul> |
| 107 | |
| 108 | |
| 109 | <p>The following diagram illustrates the relationships among these entities:</p> |
| 110 | |
| 111 | <p><img src="apache-felix-osgi-bundle-repository-obr_files/obr-entities.png" align="absmiddle" border="0"></p> |
| 112 | |
| 113 | <p>The client has access to a federated set of repositories via the Repository Admin service; such as depicted in this view:</p> |
| 114 | |
| 115 | <p><img src="apache-felix-osgi-bundle-repository-obr_files/obr-high-level.png" align="absmiddle" border="0"></p> |
| 116 | |
| 117 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-repositoryfile"></a></p> |
| 118 | |
| 119 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-OBRRepositoryFile"></a>OBR Repository File</h2> |
| 120 | |
| 121 | <p>The OBR repository file is an XML-based representation of bundle |
| 122 | meta-data. The goal is provide a generic model for describing |
| 123 | dependencies among resources; as such, the term <em><b>resource</b></em> is used instead of <em><b>bundle</b></em> in the OBR repository syntax; a detailed description of the OBR meta-data format is available in the <span class="nobr"><a href="http://www2.osgi.org/download/rfc-0112_BundleRepository.pdf" title="Visit page outside Confluence" rel="nofollow">OSGi RFC 112<sup><img class="rendericon" src="apache-felix-osgi-bundle-repository-obr_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span> |
| 124 | document; this document is not completely in sync with the |
| 125 | implementation, but the concepts are still correct. The following XML |
| 126 | snippet depicts the overall structure of a repository file:</p> |
| 127 | |
| 128 | <div class="preformatted"><div class="preformattedContent"> |
| 129 | <pre><repository presentationname="..." symbolicname="..." ... > |
| 130 | <resource> |
| 131 | <description>...</description> |
| 132 | <size>...</size> |
| 133 | <documentation>...</documentation> |
| 134 | <source>...</source> |
| 135 | <category id="..."/> |
| 136 | <capability>...</capability> |
| 137 | ... |
| 138 | <requirement>...</requirement> |
| 139 | ... |
| 140 | </resource> |
| 141 | ... |
| 142 | </repository> |
| 143 | </pre> |
| 144 | </div></div> |
| 145 | |
| 146 | <p>The above repository defines a set of available resources, each |
| 147 | described by a set of meta-data. Some resource meta-data is purely |
| 148 | intended for human consumption; the most important aspects relate to |
| 149 | the generic capability/requirement model.</p> |
| 150 | |
| 151 | <p>A resource can provide any number of capabilities. A capability is a |
| 152 | typed set of properties. For example, the following is an exported |
| 153 | package capability:</p> |
| 154 | |
| 155 | <div class="preformatted"><div class="preformattedContent"> |
| 156 | <pre><capability name='package'> |
| 157 | <p n='package' v='org.foo.bar'/> |
| 158 | <p n='version' t='version' v='1.0.0'/> |
| 159 | </capability> |
| 160 | </pre> |
| 161 | </div></div> |
| 162 | |
| 163 | <p>This capability is of type 'package' and exports 'org.foo.bar' at |
| 164 | version '1.0.0'. Conversely, a requirement is a typed LDAP query over a |
| 165 | set of capability properties. For example, the following is an imported |
| 166 | package requirement:</p> |
| 167 | |
| 168 | <div class="preformatted"><div class="preformattedContent"> |
| 169 | <pre><require name='package' extend='false' |
| 170 | multiple='false' optional='false' |
| 171 | filter='(&amp;(package=org.foo.bar)(version&gt;=1.0.0))'> |
| 172 | Import package org.foo.bar |
| 173 | </require> |
| 174 | </pre> |
| 175 | </div></div> |
| 176 | |
| 177 | <p>This requirement is of type 'package' and imports 'org.foo.bar' at |
| 178 | versions greater than '1.0.0'. Although this syntax looks rather |
| 179 | complicated with the '\&' and '\>=' syntax, it is simply the |
| 180 | standard OSGi LDAP query syntax in XML form (additionally, Peter Kriens |
| 181 | has created a tool called <tt>bindex</tt> to generate this meta-data from a bundle's manifest).</p> |
| 182 | |
| 183 | <p>With this generic dependency model, OBR is able to provide mappings |
| 184 | for the various OSGi bundle dependencies; e.g., import/export package, |
| 185 | provide/require bundle, host/fragment, import/export service, execution |
| 186 | environment, and native code. In addition, it is possible for bundles |
| 187 | to introduce arbitrary dependencies for custom purposes.</p> |
| 188 | |
| 189 | <p>Two other important pieces of meta-data are <tt>Bundle-SymbolicName</tt> and <tt>Bundle-Version</tt>; |
| 190 | these are standard OSGi bundle manifest attributes that OBR uses to |
| 191 | uniquely identify a bundle. For example, if you want to use OBR to |
| 192 | update a locally installed bundle, OBR gets its symbolic name and |
| 193 | version and searches the repository metadata for a matching symbolic |
| 194 | name. If the matching symbolic name is found, then OBR checks if there |
| 195 | is a newer version than the local copy using the bundle version number. |
| 196 | Thus, the symbolic name plus bundle version forms a unique key to match |
| 197 | locally installed bundles to remotely available bundles.</p> |
| 198 | |
| 199 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-serviceapi"></a></p> |
| 200 | |
| 201 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-OBRServiceAPI"></a>OBR Service API</h2> |
| 202 | |
| 203 | <p>Typically, OBR service clients only need to interact with the |
| 204 | Repository Admin service, which provides the mechanisms necessary to |
| 205 | discover available resources. The Repository Admin interface is defined |
| 206 | as follows:</p> |
| 207 | |
| 208 | <div class="code"><div class="codeContent"> |
| 209 | <pre class="code-java"><span class="code-keyword">public</span> <span class="code-keyword">interface</span> RepositoryAdmin |
| 210 | { |
| 211 | <span class="code-keyword">public</span> Resource[] discoverResources(<span class="code-object">String</span> filterExpr); |
| 212 | <span class="code-keyword">public</span> Resolver resolver(); |
| 213 | <span class="code-keyword">public</span> Repository addRepository(URL repository)‏ |
| 214 | <span class="code-keyword">throws</span> Exception; |
| 215 | <span class="code-keyword">public</span> <span class="code-object">boolean</span> removeRepository(URL repository); |
| 216 | <span class="code-keyword">public</span> Repository[] listRepositories(); |
| 217 | <span class="code-keyword">public</span> Resource getResource(<span class="code-object">String</span> respositoryId); |
| 218 | }</pre> |
| 219 | </div></div> |
| 220 | |
| 221 | <p>In order to resolve and deploy available resources, the Repository |
| 222 | Admin provides Resolver instances, which are defined as follows:</p> |
| 223 | |
| 224 | <div class="code"><div class="codeContent"> |
| 225 | <pre class="code-java"><span class="code-keyword">public</span> <span class="code-keyword">interface</span> Resolver |
| 226 | { |
| 227 | <span class="code-keyword">public</span> void add(Resource resource); |
| 228 | <span class="code-keyword">public</span> Requirement[] getUnsatisfiedRequirements(); |
| 229 | <span class="code-keyword">public</span> Resource[] getOptionalResources(); |
| 230 | <span class="code-keyword">public</span> Requirement[] getReason(Resource resource); |
| 231 | <span class="code-keyword">public</span> Resource[] getResources(Requirement requirement); |
| 232 | <span class="code-keyword">public</span> Resource[] getRequiredResources(); |
| 233 | <span class="code-keyword">public</span> Resource[] getAddedResources(); |
| 234 | <span class="code-keyword">public</span> <span class="code-object">boolean</span> resolve(); |
| 235 | <span class="code-keyword">public</span> void deploy(<span class="code-object">boolean</span> start); |
| 236 | }</pre> |
| 237 | </div></div> |
| 238 | |
| 239 | <p>When desired resources are discovered via the query mechanisms of |
| 240 | the Repository Admin, they are added to a Resolver instance which will |
| 241 | can be used to resolve all transitive dependencies and to reflect on |
| 242 | any resolution result. The following code snippet depicts a typical |
| 243 | usage scenario:</p> |
| 244 | |
| 245 | <div class="code"><div class="codeContent"> |
| 246 | <pre class="code-java">RepositoryAdmin repoAdmin = ... <span class="code-comment">// Get repo admin service |
| 247 | </span>Resolver resolver = repoAdmin.resolver(); |
| 248 | Resource resource = repoAdmin.discoverResources(filterStr); |
| 249 | resolver.add(resource); |
| 250 | <span class="code-keyword">if</span> (resolver.resolve()) |
| 251 | { |
| 252 | resolver.deploy(); |
| 253 | } |
| 254 | <span class="code-keyword">else</span> |
| 255 | { |
| 256 | Requirement[] reqs = resolver.getUnsatisfiedRequirements(); |
| 257 | <span class="code-keyword">for</span> (<span class="code-object">int</span> i = 0; i < reqs.length; i++) |
| 258 | { |
| 259 | <span class="code-object">System</span>.out.println(<span class="code-quote">"Unable to resolve: "</span> + reqs[i]); |
| 260 | } |
| 261 | }</pre> |
| 262 | </div></div> |
| 263 | |
| 264 | <p>This code gets the Repository Admin service and then gets a Resolver |
| 265 | instance from it. It then discovers an available resource and adds it |
| 266 | to the resolver. Then it tries to resolve the resources dependencies. |
| 267 | If successful it deploys the resource to the local framework instance; |
| 268 | if not successful it prints the unsatisfied requirements.</p> |
| 269 | |
| 270 | <p>OBR's deployment algorithm appears simple at first glance, but it is |
| 271 | actually somewhat complex due to the nature of deploying independently |
| 272 | developed bundles. For example, in an ideal world, if an update for a |
| 273 | bundle is made available, then updates for all of the bundles |
| 274 | satisfying its dependencies are also made available. Unfortunately, |
| 275 | this may not be the case, thus the deployment algorithm might have to |
| 276 | install new bundles during an update to satisfy either new dependencies |
| 277 | or updated dependencies that can no longer be satisfied by existing |
| 278 | local bundles. In response to this type of scenario, the OBR deployment |
| 279 | algorithm tries to favor updating existing bundles, if possible, as |
| 280 | opposed to installing new bundles to satisfy dependencies.</p> |
| 281 | |
| 282 | <p>In the general case, OBR user's will not use the OBR API directly, |
| 283 | but will use its functionality indirectly from another tool or user |
| 284 | interface. For example, interactive access to OBR is available via a |
| 285 | command for Felix' <a href="http://cwiki.apache.org/FELIX/apache-felix-shell-service.html" title="Apache Felix Shell Service">shell service</a>. The OBR shell command is discussed in the next section.</p> |
| 286 | |
| 287 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-shellcommand"></a></p> |
| 288 | |
| 289 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-OBRShellCommand"></a>OBR Shell Command</h2> |
| 290 | |
| 291 | <p>Besides providing a service API, OBR implements a Felix shell |
| 292 | command for accessing its functionality. For the end user, the OBR |
| 293 | shell command is accessed using the text-based or GUI-based user |
| 294 | interfaces for Felix' shell service. This section describes the syntax |
| 295 | for the OBR shell command.</p> |
| 296 | |
| 297 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrhelp"></a></p> |
| 298 | |
| 299 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrhelp}}"></a><tt>obr help</tt></h3> |
| 300 | |
| 301 | <p>Syntax:</p> |
| 302 | <div class="preformatted"><div class="preformattedContent"> |
| 303 | <pre>obr help [urls | list | info | install | deploy | start | update | source] |
| 304 | </pre> |
| 305 | </div></div> |
| 306 | <p>This command is used to display additional information about the other OBR commands.</p> |
| 307 | |
| 308 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrlisturl"></a></p> |
| 309 | |
| 310 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrlisturl}}"></a><tt>obr list-url</tt></h3> |
| 311 | |
| 312 | <p>Syntax:</p> |
| 313 | <div class="preformatted"><div class="preformattedContent"> |
| 314 | <pre>obr list-url |
| 315 | </pre> |
| 316 | </div></div> |
| 317 | <p>This command gets the URLs to the repository files used by the Repository Admin.</p> |
| 318 | |
| 319 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obraddurl"></a></p> |
| 320 | |
| 321 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obraddurl}}"></a><tt>obr add-url</tt></h3> |
| 322 | |
| 323 | <p>Syntax:</p> |
| 324 | <div class="preformatted"><div class="preformattedContent"> |
| 325 | <pre>obr add-url [<repository-file-url> ...] |
| 326 | </pre> |
| 327 | </div></div> |
| 328 | <p>This command adds a repository file to the set of repository files |
| 329 | for which the Repository Admin service provides access. The repository |
| 330 | file is represented as a URL. If the repository file URL is already in |
| 331 | the Repository Admin's set of repository files, the request is treated |
| 332 | like a reload operation.</p> |
| 333 | |
| 334 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrremoveurl"></a></p> |
| 335 | |
| 336 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrremoveurl}}"></a><tt>obr remove-url</tt></h3> |
| 337 | |
| 338 | <p>Syntax:</p> |
| 339 | <div class="preformatted"><div class="preformattedContent"> |
| 340 | <pre>obr remove-url [<repository-file-url> ...] |
| 341 | </pre> |
| 342 | </div></div> |
| 343 | <p>This command removes a repository file to the set of repository |
| 344 | files for which the Repository Admin service provides access. The |
| 345 | repository file is represented as a URL.</p> |
| 346 | |
| 347 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrlist"></a></p> |
| 348 | |
| 349 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrlist}}"></a><tt>obr list</tt></h3> |
| 350 | |
| 351 | <p>Syntax:</p> |
| 352 | <div class="preformatted"><div class="preformattedContent"> |
| 353 | <pre>obr list [<string> ...] |
| 354 | </pre> |
| 355 | </div></div> |
| 356 | <p>This command lists bundles available in the bundle repository. If no |
| 357 | arguments are specified, then all available bundles are listed, |
| 358 | otherwise any arguments are concatenated with spaces and used as a |
| 359 | substring filter on the bundle names.</p> |
| 360 | |
| 361 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrinfo"></a></p> |
| 362 | |
| 363 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrinfo}}"></a><tt>obr info</tt></h3> |
| 364 | |
| 365 | <p>Syntax:</p> |
| 366 | <div class="preformatted"><div class="preformattedContent"> |
| 367 | <pre>obr info <bundle-name>[;<version>] ... |
| 368 | </pre> |
| 369 | </div></div> |
| 370 | <p>This command displays the meta-data for the specified bundles. If a |
| 371 | bundle's name contains spaces, then it must be surrounded by quotes. It |
| 372 | is also possible to specify a precise version if more than one version |
| 373 | exists, such as:</p> |
| 374 | <div class="preformatted"><div class="preformattedContent"> |
| 375 | <pre>obr info "Bundle Repository";1.0.0 |
| 376 | </pre> |
| 377 | </div></div> |
| 378 | <p>The above example retrieves the meta-data for version "1.0.0" of the bundle named "Bundle Repository".</p> |
| 379 | |
| 380 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrdeploy"></a></p> |
| 381 | |
| 382 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrdeploy}}"></a><tt>obr deploy</tt></h3> |
| 383 | |
| 384 | <p>Syntax:</p> |
| 385 | <div class="preformatted"><div class="preformattedContent"> |
| 386 | <pre>obr deploy [-nodeps] <bundle-name>[;<version>] ... | <bundle-id> ... |
| 387 | </pre> |
| 388 | </div></div> |
| 389 | <p>This command tries to install or update the specified bundles and |
| 390 | all of their dependencies by default; use the "-nodeps" switch to |
| 391 | ignore dependencies. You can specify either the bundle name or the |
| 392 | bundle identifier. If a bundle's name contains spaces, then it must be |
| 393 | surrounded by quotes. It is also possible to specify a precise version |
| 394 | if more than one version exists, such as:</p> |
| 395 | <div class="preformatted"><div class="preformattedContent"> |
| 396 | <pre>obr deploy "Bundle Repository";1.0.0 |
| 397 | </pre> |
| 398 | </div></div> |
| 399 | <p>For the above example, if version "1.0.0" of "Bundle Repository" is |
| 400 | already installed locally, then the command will attempt to update it |
| 401 | and all of its dependencies; otherwise, the command will install it and |
| 402 | all of its dependencies.</p> |
| 403 | |
| 404 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrstart"></a></p> |
| 405 | |
| 406 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrstart}}"></a><tt>obr start</tt></h3> |
| 407 | |
| 408 | <p>Syntax:</p> |
| 409 | <div class="preformatted"><div class="preformattedContent"> |
| 410 | <pre>obr start [-nodeps] <bundle-name>[;<version>] ... |
| 411 | </pre> |
| 412 | </div></div> |
| 413 | <p>This command installs and starts the specified bundles and all of |
| 414 | their dependencies by default; use the "-nodeps" switch to ignore |
| 415 | dependencies. If a bundle's name contains spaces, then it must be |
| 416 | surrounded by quotes. If a specified bundle is already installed, then |
| 417 | this command has no effect. It is also possible to specify a precise |
| 418 | version if more than one version exists, such as:</p> |
| 419 | <div class="preformatted"><div class="preformattedContent"> |
| 420 | <pre>obr start "Bundle Repository";1.0.0 |
| 421 | </pre> |
| 422 | </div></div> |
| 423 | <p>The above example installs and starts the "1.0.0" version of the bundle named "Bundle Repository" and its dependencies.</p> |
| 424 | |
| 425 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-obrsource"></a></p> |
| 426 | |
| 427 | <h3><a name="ApacheFelixOSGiBundleRepository(OBR)-{{obrsource}}"></a><tt>obr source</tt></h3> |
| 428 | |
| 429 | <p>Syntax:</p> |
| 430 | <div class="preformatted"><div class="preformattedContent"> |
| 431 | <pre>obr source [-x] <local-dir> <bundle-name>[;<version>] ... |
| 432 | </pre> |
| 433 | </div></div> |
| 434 | <p>This command retrieves the source archives of the specified bundles |
| 435 | and saves them to the specified local directory; use the "-x" switch to |
| 436 | automatically extract the source archives. If a bundle name contains |
| 437 | spaces, then it must be surrounded by quotes. It is also possible to |
| 438 | specify a precise version if more than one version exists, such as:</p> |
| 439 | <div class="preformatted"><div class="preformattedContent"> |
| 440 | <pre>obr source /home/rickhall/tmp "Bundle Repository";1.0.0 |
| 441 | </pre> |
| 442 | </div></div> |
| 443 | <p>The above example retrieves the source archive of version "1.0.0" of |
| 444 | the bundle named "Bundle Repository" and saves it to the specified |
| 445 | local directory.</p> |
| 446 | |
| 447 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-proxy"></a></p> |
| 448 | |
| 449 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-UsingOBRwithaProxy"></a>Using OBR with a Proxy</h2> |
| 450 | |
| 451 | <p>If you use a proxy for Web access, then OBR will not work for you in |
| 452 | its default configuration; certain system properties must be set to |
| 453 | enable OBR to work with a proxy. These properties are:</p> |
| 454 | |
| 455 | <ul> |
| 456 | <li>http.proxyHost - the name of the proxy host.</li> |
| 457 | <li>http.proxyPort - the port of the proxy host.</li> |
| 458 | <li>http.proxyAuth |
| 459 | - the user name and password to use when connecting to the proxy; this |
| 460 | string should be the user name and password separated by a colon (e.g., |
| 461 | rickhall:mypassword).</li> |
| 462 | </ul> |
| 463 | |
| 464 | |
| 465 | <p>These system properties can be set directly on the command line when |
| 466 | starting the JVM using the standard "-D<prop>=<value>" |
| 467 | syntax or you can put them in the lib/system.properties file of your |
| 468 | Felix installation; see documentation on configuring Felix for more |
| 469 | information.</p> |
| 470 | |
| 471 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-sourcepackaging"></a></p> |
| 472 | |
| 473 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-BundleSourcePackaging"></a>Bundle Source Packaging</h2> |
| 474 | |
| 475 | <p>Coming soon...</p> |
| 476 | |
| 477 | <p><a name="ApacheFelixOSGiBundleRepository(OBR)-feedback"></a></p> |
| 478 | |
| 479 | <h2><a name="ApacheFelixOSGiBundleRepository(OBR)-Feedback"></a>Feedback</h2> |
| 480 | |
| 481 | <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-osgi-bundle-repository-obr_files/mail_small.gif" alt="" align="absmiddle" border="0" height="12" width="13"></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-osgi-bundle-repository-obr_files/mail_small.gif" alt="" align="absmiddle" border="0" height="12" width="13"></sup></a></span>.</p> |
| 482 | </div> |
| 483 | </body></html> |