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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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.easytesting</groupId>
  45. <artifactId>fest-assert</artifactId>
  46. <version>1.4</version>
  47. <scope>test</scope>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.assertj</groupId>
  51. <artifactId>assertj-core</artifactId>
  52. <version>2.1.0</version>
  53. </dependency>
  54. </dependencies>
  55. <build>
  56. <pluginManagement>
  57. <plugins>
  58. <plugin>
  59. <groupId>org.apache.maven.plugins</groupId>
  60. <artifactId>maven-surefire-plugin</artifactId>
  61. <configuration>
  62. <systemProperties>
  63. <scanner.version>${scanner.version}</scanner.version>
  64. </systemProperties>
  65. <includes>
  66. <include>**/SonarScannerTestSuite.java</include>
  67. </includes>
  68. </configuration>
  69. </plugin>
  70. </plugins>
  71. </pluginManagement>
  72. </build>
  73. <profiles>
  74. <profile>
  75. <id>download-qa-artifacts</id>
  76. <activation>
  77. <property>
  78. <name>env.CI_BUILD_NUMBER</name>
  79. </property>
  80. </activation>
  81. <build>
  82. <plugins>
  83. <plugin>
  84. <groupId>org.codehaus.gmaven</groupId>
  85. <artifactId>groovy-maven-plugin</artifactId>
  86. <version>2.0</version>
  87. <executions>
  88. <execution>
  89. <id>compute-qa-version</id>
  90. <phase>initialize</phase>
  91. <goals>
  92. <goal>execute</goal>
  93. </goals>
  94. <configuration>
  95. <source><![CDATA[
  96. String pom = new File(project.basedir, '../pom.xml').getText('UTF-8')
  97. def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/
  98. assert matcher.matches()
  99. project.properties['scanner.version'] = matcher[0][1] + '-build' + System.getenv()['CI_BUILD_NUMBER']
  100. ]]>
  101. </source>
  102. </configuration>
  103. </execution>
  104. </executions>
  105. </plugin>
  106. <plugin>
  107. <groupId>org.apache.maven.plugins</groupId>
  108. <artifactId>maven-dependency-plugin</artifactId>
  109. <version>2.10</version>
  110. <executions>
  111. <execution>
  112. <id>download-qa-scanner</id>
  113. <phase>initialize</phase>
  114. <goals>
  115. <goal>get</goal>
  116. </goals>
  117. <configuration>
  118. <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip</artifact>
  119. </configuration>
  120. </execution>
  121. </executions>
  122. </plugin>
  123. </plugins>
  124. </build>
  125. </profile>
  126. </profiles>
  127. </project>