variables: MVN_OPTS: >- --batch-mode --errors --fail-at-end --show-version --no-transfer-progress -DinstallAtEnd=true -DdeployAtEnd=true -Dsonar.host.url=$SONAR_URL -Dsonar.token=$SONAR_TOKEN -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true image: maven:3.9.1-eclipse-temurin-17 cache: key: "$CI_JOB_NAME" paths: - .m2/repository stages: - build - test - analyze build: stage: build script: - echo "Starting Maven build..." - mvn $MVN_OPTS clean compile test: stage: test script: - echo "Starting Maven Test..." - mvn $MVN_OPTS test analyze: stage: analyze script: - echo "Starting Code Analysis..." - mvn $MVN_OPTS verify sonar:sonar -Pcoverage