Hello,
as our projects are moving forward we are running slowly in some sort of
maintenance problems as our projects are getting complexer.
Some (perhaps even most) of the problems could be solved by two extensions
to the features mechanism:
1. The ability to "install" a configuration is a great thing, but currently
only new configurations are installed. So if a configuration for a given PID
exists, it isn't touched.
For us it would be very helpful to be able to extend an existing
configuration by merging the new properties of a config-feature to the
existing configuration.
For example:
The initial configuration looked like:
<feature name="config-feature" version="1.0">
<config name="sample.conf">
prop1=value1
</config>
</feature>
The updated configuration could be:
<feature name="config-feature" version="1.1">
<config name="sample.conf">
prop1=value1
prop2=value2
</config>
</feature>
So if you install config-feature/1.0, uninstall it and install
config-feature/1.1, prop2 will not be set/initialized in CM, since
"sample.conf" is existing.
It would be very nice if the config-installer would be able to process the
existing configuration and at least adds properties that are not existing.
Possibly the behaviour of the config-installer could be influenced by an
extension to the "config"-tag. Something like
<config name="sample.conf" mergeconf="yes/no/overwrite">
would even allow the complete overwriting of an existing configuration.
2. The feature-definitions open the ability to "chain" to installation of
features by defining dependend features. So you could install a "main"
feature that includes all features you need to run your application. If you
install "main" all the defined and needed features are installed
(recursively).
But when you uninstall the "main" feature, all other features (referenced in
"main") aren't touched and are kept installed and each of them has to
uninstalled "by hand".
So an extension like "features:uninstall -r main" would be helpful that
uninstalls all dependend features recursively just like "features:install"
does for installing features.
I am aware of the fact that this not exactly the way features should be used
and that it is much more complex than described (look up features already
installed, etc.), but such an extension would make life much more easier.
Excuses if I missed some point or didn't understand something, since I am
wondering that no one else seems to ran in these problems so far.
Thank you for any responses/opinions.
Best regards,
Uwe.
--
View this message in context:
http://karaf.922171.n3.nabble.com/DISCUSS-Extensions-to-features-tp3536881p3536881.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.