Update SonarCloud integration to use Maven plugin

Replaced Sonar Scanner CLI with Maven Sonar plugin in the CI workflow for better integration and simplicity. Added SonarCloud configuration properties to `pom.xml` for centralized management. This streamlines the setup and ensures consistency across the project.
This commit is contained in:
2025-04-22 07:01:42 +02:00
parent ead7dc7de2
commit c3b4a721f3
2 changed files with 6 additions and 13 deletions
+2 -13
View File
@@ -45,20 +45,9 @@ sonarcloud_scan:
stage: sonarcloud_scan
dependencies:
- build
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [ "" ]
script:
- |
sonar-scanner \
-Dsonar.projectKey=${SONAR_PROJECT_KEY} \
-Dsonar.organization=${SONAR_ORGANIZATION} \
-Dsonar.token=${SONAR_TOKEN} \
-Dsonar.branch.name=develop \
-Dsonar.projectBaseDir=${CI_PROJECT_DIR} \
-Dsonar.tests=src/test/java \
-Dsonar.exclusions=docs/** \
-Dsonar.java.binaries=target/classes
- mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectKey=thischwa_CloudflareDNS-java
only:
- merge_requests
- develop