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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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>65.0.218</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>17</maven.compiler.release>
  24. <orchestrator.version>4.1.0.495</orchestrator.version>
  25. </properties>
  26. <dependencies>
  27. <dependency>
  28. <groupId>com.google.code.findbugs</groupId>
  29. <artifactId>jsr305</artifactId>
  30. <version>2.0.3</version>
  31. <scope>provided</scope>
  32. </dependency>
  33. <dependency>
  34. <groupId>org.sonarsource.orchestrator</groupId>
  35. <artifactId>sonar-orchestrator</artifactId>
  36. <version>${orchestrator.version}</version>
  37. <scope>test</scope>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.sonarsource.orchestrator</groupId>
  41. <artifactId>sonar-orchestrator-junit4</artifactId>
  42. <version>${orchestrator.version}</version>
  43. <scope>test</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>junit</groupId>
  47. <artifactId>junit</artifactId>
  48. <version>4.13.1</version>
  49. <scope>test</scope>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.sonarsource.sonarqube</groupId>
  53. <artifactId>sonar-ws</artifactId>
  54. <version>${sonar.buildVersion}</version>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.assertj</groupId>
  58. <artifactId>assertj-core</artifactId>
  59. <version>3.12.2</version>
  60. </dependency>
  61. </dependencies>
  62. <build>
  63. <pluginManagement>
  64. <plugins>
  65. <plugin>
  66. <groupId>org.apache.maven.plugins</groupId>
  67. <artifactId>maven-surefire-plugin</artifactId>
  68. <configuration>
  69. <systemProperties>
  70. <scanner.version>${scanner.version}</scanner.version>
  71. </systemProperties>
  72. <includes>
  73. <include>**/SonarScannerTestSuite.java</include>
  74. </includes>
  75. </configuration>
  76. </plugin>
  77. </plugins>
  78. </pluginManagement>
  79. </build>
  80. <profiles>
  81. <profile>
  82. <id>download-qa-artifacts</id>
  83. <activation>
  84. <property>
  85. <name>env.CI_BUILD_NUMBER</name>
  86. </property>
  87. </activation>
  88. <build>
  89. <plugins>
  90. <plugin>
  91. <groupId>org.codehaus.gmaven</groupId>
  92. <artifactId>groovy-maven-plugin</artifactId>
  93. <version>2.0</version>
  94. <executions>
  95. <execution>
  96. <id>compute-qa-version</id>
  97. <phase>initialize</phase>
  98. <goals>
  99. <goal>execute</goal>
  100. </goals>
  101. <configuration>
  102. <source><![CDATA[
  103. String pom = new File(project.basedir, '../pom.xml').getText('UTF-8')
  104. def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/
  105. assert matcher.matches()
  106. def versionNoSnapshot = matcher[0][1]
  107. if (new StringTokenizer(versionNoSnapshot, ".").countTokens() == 2) {
  108. versionNoSnapshot += '.0'
  109. }
  110. project.properties['scanner.version'] = versionNoSnapshot + '.' + System.getenv()['CI_BUILD_NUMBER']
  111. ]]>
  112. </source>
  113. </configuration>
  114. </execution>
  115. </executions>
  116. </plugin>
  117. <plugin>
  118. <groupId>org.apache.maven.plugins</groupId>
  119. <artifactId>maven-dependency-plugin</artifactId>
  120. <version>3.0.2</version>
  121. <executions>
  122. <execution>
  123. <id>download-qa-scanner</id>
  124. <phase>initialize</phase>
  125. <goals>
  126. <goal>get</goal>
  127. </goals>
  128. <configuration>
  129. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip</artifact>
  130. </configuration>
  131. </execution>
  132. <execution>
  133. <id>get-linux-scanner</id>
  134. <phase>initialize</phase>
  135. <goals>
  136. <goal>get</goal>
  137. </goals>
  138. <configuration>
  139. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:linux</artifact>
  140. </configuration>
  141. </execution>
  142. <execution>
  143. <id>get-windows-scanner</id>
  144. <phase>initialize</phase>
  145. <goals>
  146. <goal>get</goal>
  147. </goals>
  148. <configuration>
  149. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:windows</artifact>
  150. </configuration>
  151. </execution>
  152. <execution>
  153. <id>get-macosx-scanner</id>
  154. <phase>initialize</phase>
  155. <goals>
  156. <goal>get</goal>
  157. </goals>
  158. <configuration>
  159. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:macosx</artifact>
  160. </configuration>
  161. </execution>
  162. </executions>
  163. </plugin>
  164. </plugins>
  165. </build>
  166. </profile>
  167. </profiles>
  168. </project>