$env:SONAR_TOKEN="AQUI_VA_EL_TOKEN"
mvn clean verify -X org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
Last active
May 27, 2025 17:47
-
-
Save HectorARG/3f6362c44be416dcbd1b8c617ba9398c to your computer and use it in GitHub Desktop.
Configurate maven project for use SonarQuebe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<properties> | |
<java.version>21</java.version> | |
<spring-cloud.version>2024.0.0</spring-cloud.version> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
<sonar.maven.plugin.groupId>org.sonarsource.scanner.maven</sonar.maven.plugin.groupId> | |
<sonar.maven.plugin.version>4.0.0.4121</sonar.maven.plugin.version> | |
<jacoco.maven.plugin.version>0.8.11</jacoco.maven.plugin.version> | |
<sonar.projectKey>authorization-server</sonar.projectKey> | |
<sonar.host.url>http://gitlab-dtiyt.durango.gob.mx/</sonar.host.url> | |
<sonar.token>${env.SONAR_TOKEN}</sonar.token> | |
<sonar.sources>src/main/java</sonar.sources> | |
<sonar.tests>src/test/java</sonar.tests> | |
<sonar.java.source>${java.version}</sonar.java.source> | |
<sonar.language>java</sonar.language> | |
<sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> | |
</properties> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.jacoco</groupId> | |
<artifactId>jacoco-maven-plugin</artifactId> | |
<version>${jacoco.maven.plugin.version}</version> | |
<executions> | |
<execution> | |
<id>prepare-agent</id> | |
<goals> | |
<goal>prepare-agent</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>report</id> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>report</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>${sonar.maven.plugin.groupId}</groupId> | |
<artifactId>sonar-maven-plugin</artifactId> | |
<version>${sonar.maven.plugin.version}</version> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment