blob: 174056cec15c2809d15fb252252e3650f42090a5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<script type="text/javascript">var xookiConfig = {level: 1};</script>
<script type="text/javascript" src="../xooki/xooki.js"></script>
</head>
<body>
<textarea id="xooki-source">
<table class="resolver">
<tr><td class="title">Tag</td><td class="value">obr</td></tr>
<tr><td class="title">Handle latest</td><td class="value">yes</td></tr>
<tr><td class="title">Handle publish</td><td class="value">no</td></tr>
</table>
<span class="since">since 2.3</span>
<span class="tagdoc" id="ivysettings.resolvers.obr">This resolver is one of the resolver which supports <a href="../osgi.html">OSGi&#153;</a> dependencies. As part of the OSGi specification resides the OBR (OSGi Bundle Repository). The OBR defines the aggregation of the OSGi metadata of every bundle included in an repository. So contrary to the other resolvers, this resolver needs to get the descriptor of the repository (an obr.xml) before starting to resolve modules.
<h1>Attributes</h1>
This resolver shares the <a href="../settings/resolvers.html#common">common attributes</a> of composite resolvers.
<table class="ivy-attributes">
<thead>
<tr><th class="ivy-att">Attribute</th><th class="ivy-att-desc">Description</th><th class="ivy-att-req">Required</th></tr>
</thead>
<tbody>
<tr><td>repoXmlURL</td><td>the URL of the obr.xml to load.</td>
<td>Yes</td></tr>
<tr><td>repoXmlFile</td><td>the local path of the obr.xml to load.</td>
<td>Yes</td></tr>
<tr><td>requirementStrategy</td><td>defines how strict should be the OSGi resolution. Can be one of <tt>first</tt> or <tt>noambiguity</tt></td>
<td>No, default to <tt>noambiguity</tt></td></tr>
<tr><td>metadataTtl</td><td>the time in milliseconds the obr.xml is considered up to date</td>
<td>No, default to 3600000 (1 hour)</td></tr>
<tr><td>forceMetadataUpdate</td><td>force the update of the obr.xml without checking its freshness</td>
<td>No, default to false</td></tr>
</tbody>
</table>
The requirement strategy is defining how the resolver should behave in front of several choices. In the OSGi dependency model, an <tt>Import-Package</tt> requirement can be satisfied by several different bundles. So when resolving such requirement, Ivy will first look into the already resolved bundles if one provides that package. If it fails to find one, then two behaviours can occur:
<ul>
<li>if the requirement strategy is <tt>first</tt>, among the bundles statifying the requirement, it will shoose the first one. A warn will be logged ahout the choice Ivy has to arbitrarily do.</li>
<li>if the requirement strategy is <tt>noambiguity</tt>, Ivy will make the resolution fail.</li>
</ul>
<h1>Examples</h1>
<code type="xml">
<obr name="felix-repo" repoXmlURL="http://felix.apache.org/obr/releases.xml" />
</code>
A simple repository configured to use the Felix OBR.
<hr />
<code type="xml">
<obr name="my-osgi-repo" repoXmlFile="${ivy.settings.dir}/obr/obr.xml" requirementStrategy="first" />
</code>
A local repository which is trusted to always provide correct dependency for the <tt>Import-Package</tt> requirements.
</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>