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

Bengt Rodehav commented on KARAF-1014:
--------------------------------------

Glen (and JB),

I agree that it is necessary to "require" a properties file as well as 
"optionally include" a properties file. I originally wrote that in the 
description but thought it better to see if there is a need for this. Your 
comment confirms that this is also a requirement.

I would then propose either:

# Extending the syntax so that it is possible to specify whether the file 
should be regarded as optional or mandatory.
# Having one property for mandatory includes and another for optional includes. 

The second option is probably the easiest to implement. However, I'm not sure 
whether ordering might be an issue. Does Karaf perform a multipass evaluation 
so that all variables can be cross-referenced between the property files or do 
you only perform a single pass? In the latter case I assume that ordering 
matters.

The first option lets you specify the ordering and would also let you override 
mandatory properties. The second option would probably imply that you first 
evaluate all mandatory files and then all optional files which puts a 
restriction on how you can order the files. Might be OK I guess and would 
definitely be easier to implement.

                
> Make files specified by ${includes} optional
> --------------------------------------------
>
>                 Key: KARAF-1014
>                 URL: https://issues.apache.org/jira/browse/KARAF-1014
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-config
>    Affects Versions: 2.2.4
>            Reporter: Bengt Rodehav
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>
> The ${includes} property in custom.properties is used to list property files 
> that will be read and evaluated by Karaf at startup. However, if a file 
> listed this way does not exist, then Karaf fails to start. When using this as 
> a means to give a user the possibility to add custom properties, it makes 
> sense to change this behaviour so that Karaf picks up the file if it exists 
> otherwise it will be ignored and Karaf will continue its startup process.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to