-
Notifications
You must be signed in to change notification settings - Fork 432
/
sonarqube.xml
33 lines (26 loc) · 1.15 KB
/
sonarqube.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<project default="sonar" basedir=".">
<!-- gets overridden by the jenkins job -->
<property name="sonar.host.url" value="http://localhost:9000" />
<property name="sonar.login" value="xxx" />
<!-- source SonarQube project properties -->
<property file="sonar-project.properties"/>
<property name="downloads" location="build/downloads"/>
<property name="sonarqube-ant-task-jar" location="${downloads}/sonarqube-ant-task.jar"/>
<property name="sonarqube-ant-task-url"
value="https://binaries.sonarsource.com/Distribution/sonarqube-ant-task/sonarqube-ant-task-2.6.0.1426.jar"/>
<target name="download">
<mkdir dir="${downloads}"/>
<get dest="${sonarqube-ant-task-jar}" src="${sonarqube-ant-task-url}"/>
</target>
<target name="build-classes">
<ant antfile="launch-build.xml">
<property name="args" value="-Djenkins=t"/>
</ant>
</target>
<target name="sonar" depends="build-classes,download">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="${sonarqube-ant-task-jar}" />
</taskdef>
<sonar:sonar xmlns:sonar="antlib:org.sonar.ant"/>
</target>
</project>