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

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