Mercurial > public > develkit
diff sonar-ant.xml @ 233:400f9d8bbf5b
DEP-13: enable sonar analysis for gradle 3.1 projects. disable sonar for ant based projects
author | smith@nwoca.org |
---|---|
date | Wed, 19 Oct 2016 22:42:08 +0100 |
parents | f1144aa0c01b |
children | 49e9edc80170 |
line wrap: on
line diff
--- a/sonar-ant.xml Tue Oct 18 18:29:04 2016 +0100 +++ b/sonar-ant.xml Wed Oct 19 22:42:08 2016 +0100 @@ -1,70 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <project name="sonar-project-tasks" default="" basedir="." - xmlns:ivy="antlib:fr.jayasoft.ivy.ant" - xmlns:sonar="antlib:org.sonar.ant" - xmlns:ssdt="http://www.ssdt-ohio.org/ant/common" - xmlns:ssdtant="antlib:org.ssdt_ohio.tools.ant"> - - <description>Sonar Ant tasks</description> - - <property name="ssdt.sonar.jar.src" - value="http://ivy.ssdt.nwoca.org/repository/sonar/sonar-ant-task.jar"/> - <ssdt:fetch dest="${user.home.ant.lib}/sonar.jar" - src="${ssdt.sonar.jar.src}"/> - <ssdt:import-ant file="jacoco-ant.xml"/> - - <ssdtant:add-dependency target="init" depends="-sonar-init"/> - - <target name="-sonar-init"> - <if> - <isset property="sonar.enabled"/> - <then> - <echo message="Sonar: Active"/> - </then> - </if> - <if> - <contains string="${ant.project.invoked-targets}" substring="sonar"/> - <then> - <property name="ignore.failing.tests" value="true"/> - </then> - </if> - <property name="sonar.active" value="true"/> - </target> + xmlns:ivy="antlib:fr.jayasoft.ivy.ant"> - <target name="-check-sonar"> - <property file="${ssdt.devel.kit}/sonar.properties"/> - <property name="sonar.host.url" value="http://ssdt-web-10.nwoca.org:9000" /> - <property name="sonar.language" value="grvy"/> - <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml"/> - </target> - - <target name="sonar" depends="project.init,-check-sonar,ivy-info,coverage.xml" if="sonar.enabled"> - <fail unless="sonar.active" message="Sonar has not been initialized"/> - <property name="sonar.projectname" value="${ivy.project.module}"/> - <sonar:sonar - workDir="${build.dir}/sonar" - key="${ivy.project.organisation}:${sonar.projectname}" - version="${project.version}" > - <sources> - <path location="${src.dir}" /> - </sources> - <property key="sonar.core.codeCoveragePlugin" value="jacoco"/> - <property key="sonar.projectName" value="${sonar.projectname}"/> - <property key="sonar.language" value="${sonar.language}" /> - <property key="sonar.java.source" value="${javac.source}" /> - <property key="sonar.java.target" value="${java.target}" /> - <property key="sonar.dynamicAnalysis" value="reuseReports" /> - <property key="sonar.surefire.reportsPath" value="${build.test.results.dir}"/> - <property key="sonar.jacoco.reportPath" value="${jacoco.data.file}"/> - <property key="sonar.jacoco.itReportPath" value="${jacoco.data.file}"/> - <tests> - <path location="${test.src.dir}" /> - </tests> - <binaries> - <path location="${build.classes.dir}" /> - </binaries> - </sonar:sonar> - <fail if="tests.failed" unless="sonar.use.build.breaker">Some tests failed; see details above. (sonar)</fail> + <description>Sonar Ant tasks - disabled 19-Oct-2016/djs</description> + + <target name="sonar" if="sonar.enabled"> + <echo message="ant based sonar analysis has been dislabled"/> </target> </project>