Sonar

Oct 10th, 2020

Installation and run

pom.xml

<build>
    <plugins>
        <plugin>
            <groupId>org.sonarsource.scanner.maven</groupId>
            <artifactId>sonar-maven-plugin</artifactId>
            <version>3.9.1.2184</version>
        </plugin>
    </plugins>
</build>

settings.xml

<profile>
    <id>sonar</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
        <sonar.host.url>http://localhost:9000</sonar.host.url>
        <sonar.projectKey>[PROJECT_KEY]</sonar.projectKey>
        <sonar.login>[TOKEN]</sonar.login>
        <!--<sonar.exclusions>**/*.py,**/*.css,**/*.js</sonar.exclusions>-->
        <!--<sonar.scm.provider>git</sonar.scm.provider>-->
        <!--<sonar.organization>aripd</sonar.organization>-->
        <!--<sonar.projectKey>aripd_component-${project.groupId}:${project.artifactId}</sonar.projectKey>-->
        <!--<sonar.moduleKey>${artifactId}</sonar.moduleKey>-->
        <!--<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>-->
        <!--<sonar.branch.name>main</sonar.branch.name>-->
        <!--<sonar.modules>../component,../component-showcase</sonar.modules>-->
        <!--<sonar.sources>src/main/java</sonar.sources>-->
        <!--<sonar.java.binaries>**/*</sonar.java.binaries>-->
        <!--<sonar.jacoco.reportPath>component/target/jacoco.exec,component-showcase/target/jacoco.exec</sonar.jacoco.reportPath>-->
        <!--<sonar.skip>true</sonar.skip>-->
    </properties>
</profile>
mvn clean verify sonar:sonar