-
Notifications
You must be signed in to change notification settings - Fork 331
Description
Currently the properties added via JBakeConfiguration.addConfiguration are not overwriting same name configuration keys already set in the config. This is due to the fact that the configuration is merged with CompositeConfiguration.addConfiguration(...) in
jbake/jbake-core/src/main/java/org/jbake/app/configuration/DefaultJBakeConfiguration.java
Line 684 in 38946aa
| compositeConfiguration.addConfiguration(new MapConfiguration(properties)); |
This is important for the jbake-maven-plugin which calls https://github.com/jbake-org/jbake-maven-plugin/blob/e550c42b1cea4b360c5bc81183ecc87122a4291e/src/main/java/org/jbake/maven/GenerateMojo.java#L94. That way it would be possible to overwrite existing values in the jbake.properties with e.g. Maven profile specific values.
This is especially important as the existing configuration contains all keys from both local and default jbake.properties already (
| private CompositeConfiguration load(File source, File propertiesFile) throws ConfigurationException { |