diff options
author | Stefan Bodewig <bodewig@apache.org> | 2016-12-19 17:23:12 +0100 |
---|---|---|
committer | Stefan Bodewig <bodewig@apache.org> | 2016-12-19 17:24:09 +0100 |
commit | 79b97a0ef5c4f07a4f1e8ce3888d9f4e979ab56c (patch) | |
tree | ee8463b8aa3e0c46b91d693370d15c1c039789e5 /sonarqube.xml | |
parent | 0619afc83c142cc3c20c2ca2266f24af6e8b6a3c (diff) | |
download | ant-79b97a0ef5c4f07a4f1e8ce3888d9f4e979ab56c.tar.gz |
add a build file for sonarqube
Diffstat (limited to 'sonarqube.xml')
-rw-r--r-- | sonarqube.xml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sonarqube.xml b/sonarqube.xml new file mode 100644 index 000000000..4fae4f784 --- /dev/null +++ b/sonarqube.xml @@ -0,0 +1,26 @@ +<project default="sonar" basedir="."> + + <!-- gets overridden by the jenkins job --> + <property name="sonar.host.url" value="http://localhost:9000" /> + + <!-- 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://sonarsource.bintray.com/Distribution/sonarqube-ant-task/sonarqube-ant-task-2.5.jar"/> + + <target name="download"> + <mkdir dir="${downloads}"/> + <get dest="${sonarqube-ant-task-jar}" src="${sonarqube-ant-task-url}"/> + </target> + + <target name="sonar" depends="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> |