aboutsummaryrefslogtreecommitdiffstats
path: root/it/pom.xml
diff options
context:
space:
mode:
authorJulien HENRY <henryju@yahoo.fr>2016-07-05 12:22:46 +0200
committerJulien HENRY <henryju@yahoo.fr>2016-07-05 12:22:46 +0200
commit76530d18f1797b2c752f280952f8592253c245a7 (patch)
tree3593d05828935fbdc914a48b851ee2b5f5b3b2e0 /it/pom.xml
parent97df742be527eee859b83441e2cc645f19326f83 (diff)
downloadsonar-scanner-cli-76530d18f1797b2c752f280952f8592253c245a7.tar.gz
sonar-scanner-cli-76530d18f1797b2c752f280952f8592253c245a7.zip
Try to fix ITs on QA
Diffstat (limited to 'it/pom.xml')
-rw-r--r--it/pom.xml68
1 files changed, 63 insertions, 5 deletions
diff --git a/it/pom.xml b/it/pom.xml
index eb96c00..2b8d9b2 100644
--- a/it/pom.xml
+++ b/it/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -52,10 +52,10 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <version>2.1.0</version>
- </dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <version>2.1.0</version>
+ </dependency>
</dependencies>
<build>
@@ -65,6 +65,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <systemProperties>
+ <scannerVersion>${scanner.version}</scannerVersion>
+ </systemProperties>
<includes>
<include>**/SonarScannerTestSuite.java</include>
</includes>
@@ -74,4 +77,59 @@
</pluginManagement>
</build>
+ <profiles>
+ <profile>
+ <id>download-qa-artifacts</id>
+ <activation>
+ <property>
+ <name>env.CI_BUILD_NUMBER</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ <version>2.0</version>
+ <executions>
+ <execution>
+ <id>compute-qa-version</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source><![CDATA[
+ String pom = new File(project.basedir, '../pom.xml').getText('UTF-8')
+ def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/
+ assert matcher.matches()
+ project.properties['scanner.version'] = matcher[0][1] + '-build' + System.getenv()['CI_BUILD_NUMBER']
+ ]]>
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.10</version>
+ <executions>
+ <execution>
+ <id>download-qa-scanner</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>get</goal>
+ </goals>
+ <configuration>
+ <artifact>org.sonarsource.scanner.cli:sonar-scanner-cli:${scanner.version}:zip</artifact>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>