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

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