GitHub user neilxb opened a pull request:
https://github.com/apache/felix/pull/105
FELIX-5613 - SCR bundle fails to start without Config Admin
RegionConfigurationSupport does not need to directly implement
ConfigurationListener. By registering an anonymous inner class, the class
loading errors are isolated to this class and do not prevent the bundle from
starting.
**Testing Note**
I tried **very** hard to write a PAX Exam integration test that would prove
SCR works when there is no exporter of `org.osgi.service.cm`, but I believe
this is impossible due to a limitation of PAX Exam. The testing framework
always contains the OSGi Compendium bundle version 4.2.0
(`org.osgi:org.osgi.compendium:4.2.0`) because it is a dependency of PAX.
Compendium exports `org.osgi.service.cm` version 1.3.0. It cannot be removed as
far as I can tell.
I have verified manually that SCR works in both a framework with Config
Admin and a framework without Config Admin. However without an automated test
it is always possible somebody will make a change that makes SCR dependent on
Config Admin once again. I would suggest migrating to bnd-testing-maven-plugin
as this does not pollute the testing framework with dependencies.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/njbartlett/felix FELIX-5613
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/felix/pull/105.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #105
----
commit 2b8dbb83289bf37bb4563b30c05a826fd777ea71
Author: Neil Bartlett <[email protected]>
Date: 2017-04-22T18:05:53Z
FELIX-5613 - SCR bundle fails to start without Config Admin
RegionConfigurationSupport does not need to directly implement Config-
uartionListener. By registering an anonymous inner class, the class
loading errors can be isolated to this class rather than bubbling up
to the bundle activator.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---