Update CI pipeline to include build step before Sonar scan

Added a Maven build step (`mvn clean package -DskipTests`) to ensure compiled binaries are available for the SonarQube analysis. Also specified the `sonar.java.binaries` parameter to point to the correct output directory.
This commit is contained in:
2025-04-06 18:48:03 +02:00
parent 4d226716ec
commit 7810cb7d8e
+2 -1
View File
@@ -51,7 +51,8 @@ sonarcloud_scan:
paths:
- .maven-cache
script:
- sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN}
- mvn clean package -DskipTests
- sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN} -Dsonar.java.binaries=target/classes
only:
- merge_requests
- develop