You are right Benson.
Actually, in Karaf, we have three properties files:
1/ startup.properties contains the location of system bundles
2/ system.properties contains System properties, it's the alternative of
using -Dmy.stuff
3/ config.properties (and included jre.properties and custom.properties)
are configuration loaded for the OSGi framework and karaf itself
In the case of system.properties, the process would be to provision your
own system.properties based on the one provided in the standard
distribution.
Regards
JB
On 08/21/2015 03:56 PM, Benson Margulies wrote:
JB, someone might feel squeamish about the process of:
1) copy file from standard distro
2) edit
3) include in assembly
. They might be trying to find a way to just put the content they want
into a separate file. I'm a bit confused here, because I could have
sworn that things I put into custom.properties did indeed work as if
they were system properties, but I guess I might have fooled myself
somehow. The sequence above is certainly the reliable solution that I
think you are referring to.
On Fri, Aug 21, 2015 at 9:47 AM, Jean-Baptiste Onofré <[email protected]
<mailto:[email protected]>> wrote:
It's the same: custom.properties is the "override" of the
config.properties, it's not for System properties.
@maggu, I'm not sure to understand what you want to do.
You want to override or add system.properties ? Why not just
updating the system.properties ? Not sure to follow you.
Regards
JB
On 08/21/2015 03:44 PM, Benson Margulies wrote:
Wait, don't use 'overrides.properties', use 'custom.properties'.
On Fri, Aug 21, 2015 at 9:41 AM, maggu2810 <[email protected]
<mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>> wrote:
2015-08-21 15:25 GMT+02:00 Benson Margulies [via Karaf]
<[email protected]
<mailto:ml-node%[email protected]>
<mailto:ml-node%[email protected]
<mailto:ml-node%[email protected]>>>:
> It is read at startup. The important question is whether
it ends up in the
> etc directory. Have you looked at the generated assembly
to see if the file
> is in the right place? Perhaps it's not travelling from
src/main/resources
> to etc correctly.
Tried that one:
===
$ cat etc/overrides.properties
test_overrides=true
The file overrides.properties must not be used for this,
Karaf cannot
be started:
2015-08-21 15:37:50,481 | ERROR | pool-1-thread-1 |
BootFeaturesInstaller | 8 -
org.apache.karaf.features.core
- 4.0.0 | Error installing boot features
java.lang.IllegalArgumentException: No path specified on
clause:
test_overrides = true
at
org.apache.felix.utils.manifest.Parser.parseClauses(Parser.java:73)[8:org.apache.karaf.features.core:4.0.0]
===
$ cat etc/override.properties
test_override=true
karaf@root()> system:property | grep test
karaf@root()>
So, the file is not evaluated and the content is not set as
system
properties.
===
$ tail -n 1 etc/system.properties
test_system=true
karaf@root()> system:property | grep test
test_system=true
That was expected.
--
View this message in context:
http://karaf.922171.n3.nabble.com/system-properties-file-multiple-ones-tp4041994p4042001.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[email protected] <mailto:[email protected]>
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com