Mercurial > public > develkit
view sonar-ant.xml @ 33:f8b0dde24622
Replace groovy script with custom task to correct memory leak
author | smith@nwoca.org |
---|---|
date | Sat, 16 Apr 2011 16:27:53 -0400 |
parents | 22f63ae66fed |
children | 2704c479a05f |
line wrap: on
line source
<?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"> <echo message="Sonar: Active"/> <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> <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"/> <sonar:sonar workDir="${build.dir}/sonar" key="${ivy.project.organisation}:${ivy.project.module}" version="${project.version}" > <sources> <path location="${src.dir}" /> </sources> <property key="sonar.core.codeCoveragePlugin" value="jacoco"/> <property key="sonar.projectName" value="${ivy.project.module}"/> <property key="sonar.language" value="${sonar.language}" /> <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}"/> <tests> <path location="${test.src.dir}" /> </tests> <binaries> <path location="${build.dir}/classes" /> </binaries> </sonar:sonar> <fail if="tests.failed">Some tests failed; see details above. (sonar)</fail> </target> </project>