From d320dd590de887ba08560e34690235fbb42c66e1 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Tue, 11 Nov 2025 11:41:48 +0100 Subject: [PATCH] ci-scripts: update Maven home settings.xml config --- ci-scripts/commons/build.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ci-scripts/commons/build.sh b/ci-scripts/commons/build.sh index dbd9e62ba..e8448af74 100644 --- a/ci-scripts/commons/build.sh +++ b/ci-scripts/commons/build.sh @@ -236,13 +236,14 @@ if [[ "${CHECK_AND_PREPARE_KURENTO_SNAPSHOT}" == true ]]; then KURENTO_VERSION=$(awk -F'[<>]' '// {print $3}' pom.xml) if [[ "${KURENTO_VERSION}" == *"-SNAPSHOT" ]] && [[ -n "${KURENTO_SNAPSHOTS_URL:-}" ]]; then echo "Kurento version is a SNAPSHOT: ${KURENTO_VERSION}" - mkdir -p /etc/maven - chmod -R 777 /etc/maven - pushd /etc/maven - rm -f settings.xml - curl https://raw.githubusercontent.com/OpenVidu/openvidu/v2/ci-scripts/kurento-snapshots.xml -o settings.xml - sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" settings.xml - ln -sf /etc/maven/settings.xml ~/.m2/settings.xml # Link to user maven settings + mkdir -p ~/.m2 + curl https://raw.githubusercontent.com/OpenVidu/openvidu/v2/ci-scripts/kurento-snapshots.xml -o ~/.m2/settings.xml + sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" ~/.m2/settings.xml + if [[ -n "${MAVEN_HOME:-}" ]]; then + cp ~/.m2/settings.xml "${MAVEN_HOME}/conf/settings.xml" + elif [[ -n "${M2_HOME:-}" ]]; then + cp ~/.m2/settings.xml "${M2_HOME}/conf/settings.xml" + fi popd else echo "Kurento version is not a SNAPSHOT: ${KURENTO_VERSION}"