Update CI caching to use .maven-cache

Introduced a consistent cache path for Maven builds by replacing .sonar/cache with .maven-cache. This change optimizes build performance by ensuring proper caching of Maven dependencies across different jobs.
This commit is contained in:
2025-04-06 18:31:58 +02:00
parent bf12bceb56
commit 4d226716ec
+5 -1
View File
@@ -32,6 +32,10 @@ on_commits:
- echo "Running tests..."
- cd ${GITLAB_CLONE_DIR}
- mvn clean test
cache:
key: "${CI_JOB_NAME}"
paths:
- .maven-cache
only:
- /^feature.*$/
- merge_request
@@ -45,7 +49,7 @@ sonarcloud_scan:
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
- .maven-cache
script:
- sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN}
only: