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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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>37</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.0</sonar.buildVersion>
  22. <surefire.argLine>-server</surefire.argLine>
  23. <!-- following properties must be set in command-line : sonar.runtimeVersion and sonarRunner.version -->
  24. </properties>
  25. <dependencies>
  26. <dependency>
  27. <groupId>org.sonarsource.orchestrator</groupId>
  28. <artifactId>sonar-orchestrator</artifactId>
  29. <version>3.13</version>
  30. </dependency>
  31. <dependency>
  32. <groupId>junit</groupId>
  33. <artifactId>junit</artifactId>
  34. <version>4.11</version>
  35. <scope>test</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.codehaus.sonar</groupId>
  39. <artifactId>sonar-ws-client</artifactId>
  40. <version>${sonar.buildVersion}</version>
  41. <scope>test</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.sonarsource.sonarqube</groupId>
  45. <artifactId>sonar-ws</artifactId>
  46. <version>5.6</version>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.easytesting</groupId>
  50. <artifactId>fest-assert</artifactId>
  51. <version>1.4</version>
  52. <scope>test</scope>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.assertj</groupId>
  56. <artifactId>assertj-core</artifactId>
  57. <version>2.1.0</version>
  58. </dependency>
  59. </dependencies>
  60. <build>
  61. <pluginManagement>
  62. <plugins>
  63. <plugin>
  64. <groupId>org.apache.maven.plugins</groupId>
  65. <artifactId>maven-surefire-plugin</artifactId>
  66. <configuration>
  67. <systemProperties>
  68. <scanner.version>${scanner.version}</scanner.version>
  69. </systemProperties>
  70. <includes>
  71. <include>**/SonarScannerTestSuite.java</include>
  72. </includes>
  73. </configuration>
  74. </plugin>
  75. </plugins>
  76. </pluginManagement>
  77. </build>
  78. <profiles>
  79. <profile>
  80. <id>download-qa-artifacts</id>
  81. <activation>
  82. <property>
  83. <name>env.CI_BUILD_NUMBER</name>
  84. </property>
  85. </activation>
  86. <build>
  87. <plugins>
  88. <plugin>
  89. <groupId>org.codehaus.gmaven</groupId>
  90. <artifactId>groovy-maven-plugin</artifactId>
  91. <version>2.0</version>
  92. <executions>
  93. <execution>
  94. <id>compute-qa-version</id>
  95. <phase>initialize</phase>
  96. <goals>
  97. <goal>execute</goal>
  98. </goals>
  99. <configuration>
  100. <source><![CDATA[
  101. String pom = new File(project.basedir, '../pom.xml').getText('UTF-8')
  102. def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/
  103. assert matcher.matches()
  104. project.properties['scanner.version'] = matcher[0][1] + '.0.' + System.getenv()['CI_BUILD_NUMBER']
  105. ]]>
  106. </source>
  107. </configuration>
  108. </execution>
  109. </executions>
  110. </plugin>
  111. <plugin>
  112. <groupId>org.apache.maven.plugins</groupId>
  113. <artifactId>maven-dependency-plugin</artifactId>
  114. <version>2.10</version>
  115. <executions>
  116. <execution>
  117. <id>download-qa-scanner</id>
  118. <phase>initialize</phase>
  119. <goals>
  120. <goal>get</goal>
  121. </goals>
  122. <configuration>
  123. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip</artifact>
  124. </configuration>
  125. </execution>
  126. </executions>
  127. </plugin>
  128. </plugins>
  129. </build>
  130. </profile>
  131. </profiles>
  132. </project>