|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project name="piwik-java-api" default="default" basedir="."> |
| 3 | + <description>Builds, tests, and runs the project Piwik Java API.</description> |
| 4 | + <import file="nbproject/build-impl.xml"/> |
| 5 | + |
| 6 | + <target depends="-javadoc-build" name="-post-jar"> |
| 7 | + <jar compress="${jar.compress}" basedir="dist/javadoc" destfile="dist/${ant.project.name}-${project.version}-javadoc.jar" /> |
| 8 | + <jar compress="${jar.compress}" basedir="src" destfile="dist/${ant.project.name}-${project.version}-sources.jar" /> |
| 9 | + </target> |
| 10 | + |
| 11 | + <!-- Define the Analyze target --> |
| 12 | + <target depends="init" name="analyze" description="Analyzes the project with SonarQube."> |
| 13 | + <property name="sonar.projectKey" value="com.ge.corporate.piwik" /> |
| 14 | + <property name="sonar.projectName" value="Piwik Java API" /> |
| 15 | + <property name="sonar.projectVersion" value="1.0" /> |
| 16 | + <property name="sonar.language" value="java" /> |
| 17 | + <property name="sonar.sources" value="${src.dir}" /> |
| 18 | + <taskdef name="sonar" classname="org.sonar.ant.SonarTask"> |
| 19 | + <classpath path="${file.reference.sonar-ant-task-2.2.jar}" /> |
| 20 | + </taskdef> |
| 21 | + <sonar /> |
| 22 | + </target> |
| 23 | + |
| 24 | + <!-- Define the Mutate target --> |
| 25 | + <target depends="test" name="mutate" description="Performs mutation testing on the project with Pitest."> |
| 26 | + <property name="pitest.target" value="com.ge.corporate.piwik.*" /> |
| 27 | + <property name="pitest.excludedClasses" value="*IT" /> |
| 28 | + <property name="pitest.excludedMethods" value="hashCode" /> |
| 29 | + <property name="pitest.format" value="html,xml" /> |
| 30 | + |
| 31 | + <path id="mutation.path"> |
| 32 | + <path refid="pitest.path" /> |
| 33 | + <pathelement location="${run.test.classpath}" /> |
| 34 | + </path> |
| 35 | + <path id="pitest.path"> |
| 36 | + <pathelement location="${javac.test.classpath}" /> |
| 37 | + <pathelement location="${file.reference.pitest-1.1.1.jar}" /> |
| 38 | + <pathelement location="${file.reference.pitest-ant-1.1.1.jar}" /> |
| 39 | + </path> |
| 40 | + |
| 41 | + <taskdef name="pitest" |
| 42 | + classname="org.pitest.ant.PitestTask" |
| 43 | + classpathref="pitest.path" /> |
| 44 | + <pitest |
| 45 | + pitClasspath="pitest.path" |
| 46 | + classPath="mutation.path" |
| 47 | + targetClasses="${pitest.target}" |
| 48 | + targetTests="${pitest.target}" |
| 49 | + excludedClasses="${pitest.excludedClasses}" |
| 50 | + excludedMethods="${pitest.excludedMethods}" |
| 51 | + reportDir="${build.test.results.dir}" |
| 52 | + outputFormats="${pitest.format}" |
| 53 | + sourceDir="${source.root}" |
| 54 | + threads="1" |
| 55 | + verbose="false"/> |
| 56 | + </target> |
| 57 | +</project> |
0 commit comments