<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version><sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<sonar.exclusions>
**/models/*.class,
**/repositories/*.class,
**/constants/*.class
</sonar.exclusions>
<jacoco.version>0.8.3</jacoco.version>
</properties>
<dependencies>
....
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
....
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- Jacoco report: code coverage report -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<!-- packages are excluded -->
<configuration>
<excludes>
<exclude>**/models/*.class</exclude>
<exclude>**/repositories/*.class</exclude>
<exclude>**/constants/*.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- attached to Maven test phase -->
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<activeatedProperties>dev</activeatedProperties>
<!-- sonarqube url and port -->
<sonar.host.url>http://localhost:9000</sonar.host.url>
<!-- sonarqube username -->
<sonar.login>admin</sonar.login>
<!-- sonarqube password -->
<sonar.password>password</sonar.password>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>