[ 
https://issues.apache.org/jira/browse/KARAF-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14107143#comment-14107143
 ] 

Achim Nierbeck commented on KARAF-2453:
---------------------------------------

Fix for 3.0.x: 

Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x 940a2d5d8 -> 575ec6d97


[KARAF-2453] - Using features to extend existing configuration

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/575ec6d9
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/575ec6d9
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/575ec6d9

Branch: refs/heads/karaf-3.0.x
Commit: 575ec6d97be6575c58ca236ccbed6ad25ab11c1a
Parents: 940a2d5

> Using features to extend existing configuration
> -----------------------------------------------
>
>                 Key: KARAF-2453
>                 URL: https://issues.apache.org/jira/browse/KARAF-2453
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-config, karaf-feature
>            Reporter: Jan Bernhardt
>            Assignee: Achim Nierbeck
>            Priority: Minor
>             Fix For: 4.0.0, 3.0.2, 2.4.1
>
>
> for me it looks like that there is currently no way to extend an existing 
> configuration file by installing a feature. But this is, what I would need 
> for my use case and what would be great IMHO for other users as well.
> Here is my idea.
> If a property already exists within a configuration file this property should 
> not be changed. But if a configuration file does not contain a certain key, 
> this key=value should be added at the end of the configuration file.
> Example:
> <config name="com.foo.bar">
>   myProperty = myValue
> </config>
> If com.foo.bar.cfg does not contain myProperty before the feature containing 
> this example was installed, then myProperty=myValue should be added to 
> com.foo.bar.cfg file.
> This would make it possible to extend existing configuration files for custom 
> needs. A general use-case could be logging. My application would like to add 
> a logger configuration in case this logger is not configured already.
> 2. Example
> <config name="org.ops4j.pax.logging">
>   log4j.logger.org.apache.activemq.broker.util.LoggingBrokerPlugin=INFO, 
> stdout, osgi:VmLogAppender
> </config>



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to