From c3b4a721f358b9fe6a7e8f291b8e9d70a7f4e4fa Mon Sep 17 00:00:00 2001 From: Thilo Schwarz Date: Tue, 22 Apr 2025 07:01:42 +0200 Subject: [PATCH] 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. --- .gitlab-ci.yml | 15 ++------------- pom.xml | 4 ++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5ab432..e3413d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/pom.xml b/pom.xml index 5e12889..ba03077 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,10 @@ 2.0.17 1.5.18 5.11.4 + + + thischwa + https://sonarcloud.io