Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <properties>
- <sonar-maven-plugin.version>3.3.0.603</sonar-maven-plugin.version>
- <jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
- <sonar-jacoco-listeners.version>4.10.0.10260</sonar-jacoco-listeners.version>
- <maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
- <sonar.java.binaries>${basedir}</sonar.java.binaries>
- <!--sonar properties-->
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <sonar.projectName>GR</sonar.projectName>
- <!-- Use the following property to force single language analysis, omit it to perform Multilanguage analysis -->
- <sonar.language>java</sonar.language>
- <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
- <jacoco.outputDir>${project.build.directory}</jacoco.outputDir>
- <!-- Jacoco output file for UTs -->
- <jacoco.out.ut.file>jacoco-ut.exec</jacoco.out.ut.file>
- <!-- Tells Sonar where the Jacoco coverage result file is located for Unit Tests -->
- <sonar.jacoco.reportPath>${jacoco.outputDir}/${jacoco.out.ut.file}</sonar.jacoco.reportPath>
- <!--sonar properties-->
- </properties>
- <profiles>
- <profile>
- <id>sonar</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${maven-surefire-plugin.version}</version>
- <configuration>
- <argLine>${jacoco.agent.ut.arg}</argLine>
- <properties>
- <property>
- <name>listener</name>
- <value>org.sonar.java.jacoco.JUnitListener</value>
- </property>
- </properties>
- <testFailureIgnore>true</testFailureIgnore>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>prepare-ut-agent</id>
- <phase>process-test-classes</phase>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <destFile>${sonar.jacoco.reportPath}</destFile>
- <propertyName>jacoco.agent.ut.arg</propertyName>
- <append>true</append>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.java</groupId>
- <artifactId>sonar-jacoco-listeners</artifactId>
- <version>${sonar-jacoco-listeners.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
- </profiles>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement