You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

sonarqube.xml 1.2 kB

123456789101112131415161718192021222324252627282930313233
  1. <project default="sonar" basedir=".">
  2. <!-- gets overridden by the jenkins job -->
  3. <property name="sonar.host.url" value="http://localhost:9000" />
  4. <property name="sonar.login" value="xxx" />
  5. <!-- source SonarQube project properties -->
  6. <property file="sonar-project.properties"/>
  7. <property name="downloads" location="build/downloads"/>
  8. <property name="sonarqube-ant-task-jar" location="${downloads}/sonarqube-ant-task.jar"/>
  9. <property name="sonarqube-ant-task-url"
  10. value="https://binaries.sonarsource.com/Distribution/sonarqube-ant-task/sonarqube-ant-task-2.6.0.1426.jar"/>
  11. <target name="download">
  12. <mkdir dir="${downloads}"/>
  13. <get dest="${sonarqube-ant-task-jar}" src="${sonarqube-ant-task-url}"/>
  14. </target>
  15. <target name="build-classes">
  16. <ant antfile="launch-build.xml">
  17. <property name="args" value="-Djenkins=t"/>
  18. </ant>
  19. </target>
  20. <target name="sonar" depends="build-classes,download">
  21. <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
  22. <classpath path="${sonarqube-ant-task-jar}" />
  23. </taskdef>
  24. <sonar:sonar xmlns:sonar="antlib:org.sonar.ant"/>
  25. </target>
  26. </project>