Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. <properties>
  2. <sonar-maven-plugin.version>3.3.0.603</sonar-maven-plugin.version>
  3. <jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
  4. <sonar-jacoco-listeners.version>4.10.0.10260</sonar-jacoco-listeners.version>
  5. <maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
  6. <sonar.java.binaries>${basedir}</sonar.java.binaries>
  7. <!--sonar properties-->
  8. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  9. <sonar.projectName>GR</sonar.projectName>
  10. <!-- Use the following property to force single language analysis, omit it to perform Multilanguage analysis -->
  11. <sonar.language>java</sonar.language>
  12.  
  13. <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
  14.  
  15. <jacoco.outputDir>${project.build.directory}</jacoco.outputDir>
  16. <!-- Jacoco output file for UTs -->
  17. <jacoco.out.ut.file>jacoco-ut.exec</jacoco.out.ut.file>
  18. <!-- Tells Sonar where the Jacoco coverage result file is located for Unit Tests -->
  19. <sonar.jacoco.reportPath>${jacoco.outputDir}/${jacoco.out.ut.file}</sonar.jacoco.reportPath>
  20. <!--sonar properties-->
  21.  
  22. </properties>
  23.  
  24. <profiles>
  25. <profile>
  26. <id>sonar</id>
  27. <build>
  28. <plugins>
  29. <plugin>
  30. <groupId>org.apache.maven.plugins</groupId>
  31. <artifactId>maven-surefire-plugin</artifactId>
  32. <version>${maven-surefire-plugin.version}</version>
  33. <configuration>
  34. <argLine>${jacoco.agent.ut.arg}</argLine>
  35. <properties>
  36. <property>
  37. <name>listener</name>
  38. <value>org.sonar.java.jacoco.JUnitListener</value>
  39. </property>
  40. </properties>
  41. <testFailureIgnore>true</testFailureIgnore>
  42. </configuration>
  43. </plugin>
  44. <plugin>
  45. <groupId>org.jacoco</groupId>
  46. <artifactId>jacoco-maven-plugin</artifactId>
  47. <version>${jacoco-maven-plugin.version}</version>
  48. <executions>
  49. <execution>
  50. <id>prepare-ut-agent</id>
  51. <phase>process-test-classes</phase>
  52. <goals>
  53. <goal>prepare-agent</goal>
  54. </goals>
  55. <configuration>
  56. <destFile>${sonar.jacoco.reportPath}</destFile>
  57. <propertyName>jacoco.agent.ut.arg</propertyName>
  58. <append>true</append>
  59. </configuration>
  60. </execution>
  61. </executions>
  62. </plugin>
  63. </plugins>
  64. </build>
  65. <dependencies>
  66. <dependency>
  67. <groupId>org.sonarsource.java</groupId>
  68. <artifactId>sonar-jacoco-listeners</artifactId>
  69. <version>${sonar-jacoco-listeners.version}</version>
  70. <scope>test</scope>
  71. </dependency>
  72. </dependencies>
  73. <activation>
  74. <activeByDefault>true</activeByDefault>
  75. </activation>
  76. </profile>
  77. </profiles>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement