Author: gnodet
Date: Thu Oct 21 13:50:55 2010
New Revision: 1026001
URL: http://svn.apache.org/viewvc?rev=1026001&view=rev
Log:
[KARAF-251][KARAF-252] Update features descriptor, add some docs
Modified:
karaf/trunk/assembly/src/main/filtered-resources/features.xml
karaf/trunk/manual/src/main/webapp/users-guide/provisioning.conf
Modified: karaf/trunk/assembly/src/main/filtered-resources/features.xml
URL:
http://svn.apache.org/viewvc/karaf/trunk/assembly/src/main/filtered-resources/features.xml?rev=1026001&r1=1026000&r2=1026001&view=diff
==============================================================================
--- karaf/trunk/assembly/src/main/filtered-resources/features.xml (original)
+++ karaf/trunk/assembly/src/main/filtered-resources/features.xml Thu Oct 21
13:50:55 2010
@@ -17,7 +17,7 @@
limitations under the License.
-->
<features name="karaf-${project.version}">
- <feature name="spring" version="${spring2.version}">
+ <feature name="spring" version="${spring2.version}" resolver="(obr)">
<bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
<bundle>mvn:org.springframework/spring-core/${spring2.version}</bundle>
<bundle>mvn:org.springframework/spring-beans/${spring2.version}</bundle>
@@ -25,7 +25,7 @@
<bundle>mvn:org.springframework/spring-context/${spring2.version}</bundle>
<bundle>mvn:org.springframework/spring-context-support/${spring2.version}</bundle>
</feature>
- <feature name="spring" version="${spring.version}">
+ <feature name="spring" version="${spring.version}" resolver="(obr)">
<bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
<bundle>mvn:org.springframework/spring-core/${spring.version}</bundle>
<bundle>mvn:org.springframework/spring-asm/${spring.version}</bundle>
@@ -35,9 +35,9 @@
<bundle>mvn:org.springframework/spring-context/${spring.version}</bundle>
<bundle>mvn:org.springframework/spring-context-support/${spring.version}</bundle>
</feature>
- <feature name="spring-dm" version="${spring.osgi.version}">
+ <feature name="spring-dm" version="${spring.osgi.version}"
resolver="(obr)">
<feature version="[2.5.6,4)">spring</feature>
-
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/${cglib.bundle.version}</bundle>
+ <bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/${cglib.bundle.version}</bundle>
<bundle>mvn:org.springframework.osgi/spring-osgi-io/${spring.osgi.version}</bundle>
<bundle>mvn:org.springframework.osgi/spring-osgi-core/${spring.osgi.version}</bundle>
<bundle>mvn:org.springframework.osgi/spring-osgi-extender/${spring.osgi.version}</bundle>
Modified: karaf/trunk/manual/src/main/webapp/users-guide/provisioning.conf
URL:
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/users-guide/provisioning.conf?rev=1026001&r1=1026000&r2=1026001&view=diff
==============================================================================
--- karaf/trunk/manual/src/main/webapp/users-guide/provisioning.conf (original)
+++ karaf/trunk/manual/src/main/webapp/users-guide/provisioning.conf Thu Oct 21
13:50:55 2010
@@ -14,6 +14,7 @@ element features {
element feature {
attribute name { text },
attribute version { text },
+ attribute resolver { text }
element feature {
attribute version { text },
text
@@ -22,7 +23,12 @@ element features {
attribute name { text },
text
}*,
- element bundle { text }*
+ element bundle {
+ attribute start-level { int },
+ attribute start { boolean },
+ attribute dependency { boolean },
+ text
+ }*
}*
}
{code}
@@ -143,8 +149,6 @@ Spring context will not be created witho
h4. Bundle 'stop/start'
-*Available since Karaf 2.0*
-
The OSGI specification allows to install a bundle without starting it. To use
this functionality, simply add the following attribute in your <bundle>
definition
{code:xml}
@@ -154,7 +158,11 @@ The OSGI specification allows to install
<bundle start-level='85'
start='false'>mvn:com.mycompany.myproject/myproject-service</bundle>
<bundle start-level='85'
start='false'>mvn:com.mycompany.myproject/myproject-camel-routing</bundle>
</feature>
-{code}
+{code}
+
+h4. Bundle 'dependency'
+
+A bundle can be flagged as being a dependency. Such information can be used
by resolvers to compute the final list of bundles to be installed.
h3. Dependent features
@@ -168,6 +176,15 @@ Dependent features are useful when a giv
The effect of such a dependency is to automatically install the required
{{nmr}} feature when the {{jbi}} feature will be installed.
+A version range can be specified on the feature dependency:
+{code:lang=xml}
+<feature name="spring-dm">
+ <feature version="[2.5.6,4)">spring</feature>
+ ...
+</feature>
+{code}
+In such a case, if no matching feature is already installed, the feature with
the highest version available in the range will be installed. If a single
version is specified, this version will be choosen. If nothing is specified,
the highest available will be instaleld.
+
h3. Configurations
The configuration section allows to deploy configuration for the OSGi
Configuration Admin service along a set of bundles.
@@ -200,6 +217,11 @@ Such configuration as usually used with
For more informations about using the Configuration Admin service in
Spring-DM, see the [Spring-DM
documentation|http://static.springframework.org/osgi/docs/1.2.0-m2/reference/html/compendium.html#compendium:cm:props].
+h3. Feature resolver
+
+The resolver attribute on a feature can be set to force the use of a given
resolver instead of the default resolution process. A resolver will be use to
obtain the list of bundles to actually install for a given feature.
+The default resolver will simply return the list of bundles provided in the
feature description.
+The obr resolver can be installed and used instead of the standard one. In
that case, the resolver will use the OBR service to determine the list of
bundles to install (bundles flagged as dependency will only be used as possible
candidates to solve various constraints).
h2. Commands