FELIX-5211 provide appropriate Provide/Require-Capability headers for config admin. Also update the service description
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1734366 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/pom.xml b/configadmin/pom.xml
index 056b97d..7c108c5 100644
--- a/configadmin/pom.xml
+++ b/configadmin/pom.xml
@@ -187,6 +187,7 @@
</Bundle-Activator>
<Export-Package>
<!-- just list, version from package-info classes -->
+ <!-- when the spec version changes, update the service property that includes the spec version in ConfigurationManager -->
org.apache.felix.cm;
org.apache.felix.cm.file,
org.osgi.service.cm;provide:=true;version=1.5
@@ -201,19 +202,9 @@
<!-- overwrite version from compendium bundle -->
org.osgi.service.log;version="1.3"
</DynamicImport-Package>
- <Export-Service>
- org.osgi.service.cm.ConfigurationAdmin;
- service.description="Configuration Admin Service Specification 1.5 Implementation";
- service.pid="org.osgi.service.cm.ConfigurationAdmin";
- service.vendor="Apache Software Foundation",
- org.apache.felix.cm.PersistenceManager;
- service.description="Platform Filesystem Persistence Manager";
- service.pid="org.apache.felix.cm.file.FilePersistenceManager";
- service.vendor="Apache Software Foundation"
- </Export-Service>
- <Import-Service>
- org.osgi.service.log.LogService;availability:=optional;multiple:=false
- </Import-Service>
+ <Provide-Capability>osgi.service;objectClass:List<String>="org.osgi.service.cm.ConfigurationAdmin",
+ osgi.service;objectClass:List<String>="org.apache.felix.cm.PersistenceManager"</Provide-Capability>
+ <Require-Capability>osgi.service;filter:="(objectClass=org.osgi.service.log.LogService)";effective:=active;resolution:=optional</Require-Capability>
<Embed-Dependency>
org.osgi.core;inline=org/osgi/util/tracker/ServiceTracker*|org/osgi/util/tracker/AbstractTracked.class
</Embed-Dependency>
diff --git a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
index e9e4620..ce37e97 100644
--- a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
+++ b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
@@ -278,7 +278,7 @@
ConfigurationAdminFactory caf = new ConfigurationAdminFactory( this );
Hashtable props = new Hashtable();
props.put( Constants.SERVICE_PID, "org.apache.felix.cm.ConfigurationAdmin" );
- props.put( Constants.SERVICE_DESCRIPTION, "Configuration Admin Service Specification 1.2 Implementation" );
+ props.put( Constants.SERVICE_DESCRIPTION, "Configuration Admin Service Specification 1.5 Implementation" );
props.put( Constants.SERVICE_VENDOR, "Apache Software Foundation" );
configurationAdminRegistration = bundleContext.registerService( ConfigurationAdmin.class.getName(), caf, props );