Overriding config.xml parameters

Last modified 22 Mar 2021 14:02 +01:00
Since 3.9
This functionality is available since version 3.9.

It is possible to override parameters specified in config.xml using Java system properties specified on the command line.

For example if profiling is to be temporarily enabled, one can use the following command line option:

-Dmidpoint.profilingEnabled=true

Or, for example, when customizing repository connection information one can use the following (this is in the context of a Dockerfile):

CMD java -Xmx2048M -Xms2048M -Dfile.encoding=UTF8 \
       -Dmidpoint.home=$MP_DIR/var \
       -Dmidpoint.repository.database=mariadb \
       -Dmidpoint.repository.jdbcUsername=$REPO_USER \
       -Dmidpoint.repository.jdbcPasswordFile=$REPO_PASSWORD_FILE \
       -Dmidpoint.repository.jdbcUrl=jdbc:mariadb://$REPO_HOST:$REPO_PORT/registry?characterEncoding=utf8 \
       -Dmidpoint.repository.hibernateHbm2ddl=none \
       -Dmidpoint.repository.missingSchemaAction=create \
       -Dmidpoint.repository.initializationFailTimeout=60000 \
       -jar $MP_DIR/lib/midpoint.war