What is the full error message when you run your build with -debug?
Best regards,
-marc
On 08.08.14 04:25, Michael Miller wrote:
I am learning to work with Jacoco to optimize code coverage but I am
having trouble building the build file with Jacoco. I have read the
tutorial at http://www.eclemma.org/jacoco/trunk/doc/ant.html#coverage
and have used much of their sample build.xml to work on my own. Now I
am getting this error: Error while creating report. It seems fairly
vague so could someone help me figure out why this isn't working? Also
the documention spoke about the necessity to include fork="true"
within the coverage section but testng doesn't accept fork as an
attribute.
<projectname="Project"default="result"basedir="."xmlns:jacoco="antlib:org.jacoco.ant">
<propertyname="build.dir"value="${basedir}/build"/>
<propertyname="lib.dir"value="${basedir}/lib"/>
<propertyname="src.dir"value="${basedir}/src"/>
<propertyname="result.report.dir"location="${basedir}/report"/>
<propertyname="result.exec.file"location="${basedir}/jacoco.exec"/>
<targetname="setClassPath">
<pathid="classpath_jars">
<pathelementpath="${basedir}/"/>
<filesetdir="${lib.dir}"includes="**/*.jar"/>
</path>
<pathconvertpathsep=":"property="test.classpath"refid="classpath_jars"/>
</target>
<targetname="loadTestNGAndJacoco"depends="setClassPath">
<taskdefresource="testngtasks"classpath="${test.classpath}"/>
<taskdefuri="antlib:org.jacoco.ant"resource="org/jacoco/ant/antlib.xml">
<classpathpath=".../jacoco-0/lib/jacocoant.jar"/>
</taskdef>
</target>
<targetname="compile"depends="setClassPath">
<echomessage="compiling.........."/>
<javacincludeantruntime="false"destdir="${build.dir}"srcdir="${src.dir}"classpath="${test.classpath}"/>
</target>
<targetname="test"depends="compile,setClassPath,loadTestNGAndJacoco">
<jacoco:coveragedestfile="${result.exec.file}">
<testngclasspath="${test.classpath}:${build.dir}">
<xmlfilesetdir="${basedir}"includes="testng.xml"/>
</testng>
</jacoco:coverage>
</target>
<targetname="result"depends="test,compile,setClassPath,loadTestNGAndJacoco">
<jacoco:report>
<executiondata>
<filefile="${result.exec.file}"/>
</executiondata>
<!-- the class files and optional source files ... -->
<structurename="JaCoCo Report">
<classfiles>
<filesetdir="${basedir}"includes="**/*.jar"/>
</classfiles>
<sourcefilesencoding="UTF-8">
<filesetdir="${src.dir}"/>
</sourcefiles>
</structure>
<!-- to produce reports in different formats. -->
<htmldestdir="${result.report.dir}"/>
</jacoco:report>
</target>
</project>
--
You received this message because you are subscribed to the Google
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "JaCoCo
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.