You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.sonarsource.parent</groupId>
  7. <artifactId>parent</artifactId>
  8. <version>60.0.52</version>
  9. <relativePath />
  10. </parent>
  11. <groupId>com.sonarsource.it</groupId>
  12. <artifactId>it-sonar-scanner</artifactId>
  13. <version>1.0-SNAPSHOT</version>
  14. <name>SonarSource :: IT :: SonarScanner CLI</name>
  15. <inceptionYear>2009</inceptionYear>
  16. <organization>
  17. <name>SonarSource</name>
  18. <url>http://www.sonarsource.com</url>
  19. </organization>
  20. <properties>
  21. <sonar.buildVersion>7.9.1</sonar.buildVersion>
  22. <!-- following properties must be set in command-line : sonar.runtimeVersion and sonarRunner.version -->
  23. <maven.compiler.release>8</maven.compiler.release>
  24. </properties>
  25. <dependencies>
  26. <dependency>
  27. <groupId>com.google.code.findbugs</groupId>
  28. <artifactId>jsr305</artifactId>
  29. <version>2.0.3</version>
  30. <scope>provided</scope>
  31. </dependency>
  32. <dependency>
  33. <groupId>org.sonarsource.orchestrator</groupId>
  34. <artifactId>sonar-orchestrator</artifactId>
  35. <version>3.34.0.2692</version>
  36. </dependency>
  37. <dependency>
  38. <groupId>junit</groupId>
  39. <artifactId>junit</artifactId>
  40. <version>4.13.1</version>
  41. <scope>test</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.sonarsource.sonarqube</groupId>
  45. <artifactId>sonar-ws</artifactId>
  46. <version>${sonar.buildVersion}</version>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.assertj</groupId>
  50. <artifactId>assertj-core</artifactId>
  51. <version>3.12.2</version>
  52. </dependency>
  53. </dependencies>
  54. <build>
  55. <pluginManagement>
  56. <plugins>
  57. <plugin>
  58. <groupId>org.apache.maven.plugins</groupId>
  59. <artifactId>maven-surefire-plugin</artifactId>
  60. <configuration>
  61. <systemProperties>
  62. <scanner.version>${scanner.version}</scanner.version>
  63. </systemProperties>
  64. <includes>
  65. <include>**/SonarScannerTestSuite.java</include>
  66. </includes>
  67. </configuration>
  68. </plugin>
  69. </plugins>
  70. </pluginManagement>
  71. </build>
  72. <profiles>
  73. <profile>
  74. <id>download-qa-artifacts</id>
  75. <activation>
  76. <property>
  77. <name>env.CI_BUILD_NUMBER</name>
  78. </property>
  79. </activation>
  80. <build>
  81. <plugins>
  82. <plugin>
  83. <groupId>org.codehaus.gmaven</groupId>
  84. <artifactId>groovy-maven-plugin</artifactId>
  85. <version>2.0</version>
  86. <executions>
  87. <execution>
  88. <id>compute-qa-version</id>
  89. <phase>initialize</phase>
  90. <goals>
  91. <goal>execute</goal>
  92. </goals>
  93. <configuration>
  94. <source><![CDATA[
  95. String pom = new File(project.basedir, '../pom.xml').getText('UTF-8')
  96. def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/
  97. assert matcher.matches()
  98. def versionNoSnapshot = matcher[0][1]
  99. if (new StringTokenizer(versionNoSnapshot, ".").countTokens() == 2) {
  100. versionNoSnapshot += '.0'
  101. }
  102. project.properties['scanner.version'] = versionNoSnapshot + '.' + System.getenv()['CI_BUILD_NUMBER']
  103. ]]>
  104. </source>
  105. </configuration>
  106. </execution>
  107. </executions>
  108. </plugin>
  109. <plugin>
  110. <groupId>org.apache.maven.plugins</groupId>
  111. <artifactId>maven-dependency-plugin</artifactId>
  112. <version>3.0.2</version>
  113. <executions>
  114. <execution>
  115. <id>download-qa-scanner</id>
  116. <phase>initialize</phase>
  117. <goals>
  118. <goal>get</goal>
  119. </goals>
  120. <configuration>
  121. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip</artifact>
  122. </configuration>
  123. </execution>
  124. <execution>
  125. <id>get-linux-scanner</id>
  126. <phase>initialize</phase>
  127. <goals>
  128. <goal>get</goal>
  129. </goals>
  130. <configuration>
  131. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:linux</artifact>
  132. </configuration>
  133. </execution>
  134. <execution>
  135. <id>get-windows-scanner</id>
  136. <phase>initialize</phase>
  137. <goals>
  138. <goal>get</goal>
  139. </goals>
  140. <configuration>
  141. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:windows</artifact>
  142. </configuration>
  143. </execution>
  144. <execution>
  145. <id>get-macosx-scanner</id>
  146. <phase>initialize</phase>
  147. <goals>
  148. <goal>get</goal>
  149. </goals>
  150. <configuration>
  151. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:macosx</artifact>
  152. </configuration>
  153. </execution>
  154. </executions>
  155. </plugin>
  156. </plugins>
  157. </build>
  158. </profile>
  159. </profiles>
  160. </project>