From 4fe4c5386f738ad49c967508b6f3f6fb9255605a Mon Sep 17 00:00:00 2001 From: jhh Date: Mon, 7 Oct 2019 15:40:23 -0500 Subject: Allow override of maven settings at instantiation Issue-ID: POLICY-2111 Signed-off-by: jhh Change-Id: Ib7ec8beab2947fc9fbf55734d0412f444a963fe8 Signed-off-by: jhh --- .../src/main/resources/docker-entrypoint.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'controlloop/packages/docker-controlloop/src/main') diff --git a/controlloop/packages/docker-controlloop/src/main/resources/docker-entrypoint.sh b/controlloop/packages/docker-controlloop/src/main/resources/docker-entrypoint.sh index 8e968be50..eeeeeb069 100644 --- a/controlloop/packages/docker-controlloop/src/main/resources/docker-entrypoint.sh +++ b/controlloop/packages/docker-controlloop/src/main/resources/docker-entrypoint.sh @@ -17,6 +17,27 @@ # ######################################################################## +function maven { + if [[ ${DEBUG} == y ]]; then + echo "-- ${FUNCNAME[0]} --" + set -x + fi + + if [[ -f "${POLICY_INSTALL_INIT}"/settings.xml ]]; then + if ! cmp -s "${POLICY_INSTALL_INIT}"/settings.xml "${POLICY_HOME}"/etc/m2/settings.xml then + echo "overriding settings.xml" + cp -f "${POLICY_INSTALL_INIT}"/settings.xml "${POLICY_HOME}"/etc/m2 + fi + fi + + if [[ -f "${POLICY_INSTALL_INIT}"/standalone-settings.xml ]]; then + if ! cmp -s "${POLICY_INSTALL_INIT}"/standalone-settings.xml "${POLICY_HOME}"/etc/m2/standalone-settings.xml then + echo "overriding standalone-settings.xml" + cp -f "${POLICY_INSTALL_INIT}"/standalone-settings.xml "${POLICY_HOME}"/etc/m2 + fi + fi +} + function configurations { if [[ ${DEBUG} == y ]]; then echo "-- ${FUNCNAME[0]} --" @@ -205,6 +226,7 @@ function reload { fi configurations + maven features security properties -- cgit 1.2.3-korg