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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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>44</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>5.6</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.15.1.1274</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>5.6</version>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.easytesting</groupId>
  55. <artifactId>fest-assert</artifactId>
  56. <version>1.4</version>
  57. <scope>test</scope>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.assertj</groupId>
  61. <artifactId>assertj-core</artifactId>
  62. <version>2.1.0</version>
  63. </dependency>
  64. </dependencies>
  65. <build>
  66. <pluginManagement>
  67. <plugins>
  68. <plugin>
  69. <groupId>org.apache.maven.plugins</groupId>
  70. <artifactId>maven-surefire-plugin</artifactId>
  71. <configuration>
  72. <systemProperties>
  73. <scanner.version>${scanner.version}</scanner.version>
  74. </systemProperties>
  75. <includes>
  76. <include>**/SonarScannerTestSuite.java</include>
  77. </includes>
  78. </configuration>
  79. </plugin>
  80. </plugins>
  81. </pluginManagement>
  82. </build>
  83. <profiles>
  84. <profile>
  85. <id>download-qa-artifacts</id>
  86. <activation>
  87. <property>
  88. <name>env.CI_BUILD_NUMBER</name>
  89. </property>
  90. </activation>
  91. <build>
  92. <plugins>
  93. <plugin>
  94. <groupId>org.codehaus.gmaven</groupId>
  95. <artifactId>groovy-maven-plugin</artifactId>
  96. <version>2.0</version>
  97. <executions>
  98. <execution>
  99. <id>compute-qa-version</id>
  100. <phase>initialize</phase>
  101. <goals>
  102. <goal>execute</goal>
  103. </goals>
  104. <configuration>
  105. <source><![CDATA[
  106. String pom = new File(project.basedir, '../pom.xml').getText('UTF-8')
  107. def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/
  108. assert matcher.matches()
  109. def versionNoSnapshot = matcher[0][1]
  110. if (new StringTokenizer(versionNoSnapshot, ".").countTokens() == 2) {
  111. versionNoSnapshot += '.0'
  112. }
  113. project.properties['scanner.version'] = versionNoSnapshot + '.' + System.getenv()['CI_BUILD_NUMBER']
  114. ]]>
  115. </source>
  116. </configuration>
  117. </execution>
  118. </executions>
  119. </plugin>
  120. <plugin>
  121. <groupId>org.apache.maven.plugins</groupId>
  122. <artifactId>maven-dependency-plugin</artifactId>
  123. <version>2.10</version>
  124. <executions>
  125. <execution>
  126. <id>download-qa-scanner</id>
  127. <phase>initialize</phase>
  128. <goals>
  129. <goal>get</goal>
  130. </goals>
  131. <configuration>
  132. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip</artifact>
  133. </configuration>
  134. </execution>
  135. <execution>
  136. <id>get-linux-scanner</id>
  137. <phase>initialize</phase>
  138. <goals>
  139. <goal>get</goal>
  140. </goals>
  141. <configuration>
  142. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:linux</artifact>
  143. </configuration>
  144. </execution>
  145. <execution>
  146. <id>get-windows-scanner</id>
  147. <phase>initialize</phase>
  148. <goals>
  149. <goal>get</goal>
  150. </goals>
  151. <configuration>
  152. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:windows</artifact>
  153. </configuration>
  154. </execution>
  155. <execution>
  156. <id>get-macosx-scanner</id>
  157. <phase>initialize</phase>
  158. <goals>
  159. <goal>get</goal>
  160. </goals>
  161. <configuration>
  162. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip:macosx</artifact>
  163. </configuration>
  164. </execution>
  165. </executions>
  166. </plugin>
  167. </plugins>
  168. </build>
  169. </profile>
  170. </profiles>
  171. </project>