Hi Marc,
Unfortunately, there are not any details for the failure.
Below is the total error that I got...
**************
Buildfile: D:\ANT\WS\ANTProj\build.xml
report:
[jacoco:report] Loading execution data file
D:\ANT\CodeCoverage\jacoco\jacoco_PS3_WLS1.exec
BUILD FAILED
D:\ANT\WS\ANTProj\build.xml:25: Error while creating report
Total time: 1 second
**************
In this case, I have pointed to the directory where jar files are located.
But when I picked one the jars, expanded it and pointed to that directory,
which contained classes, it worked fine. Below is the code snippet.
******************************
<structure name="Finally code coverage Report">
<classfiles>
<fileset dir="${classes.dir}" />
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src.dir}"/>
</sourcefiles>
</structure>
*******************************
When I googled also, it is mentioned that jars will be automatically taken
care of, but this is not working for me and Iam not sure where Iam going
wrong or missing something here.
Just check the above code snippets and let me know if Iam doing something
wrong.
Thanks!
*Always B Happy ,Sri Ram*
On Mon, Oct 31, 2016 at 11:41 PM, Marc R. Hoffmann <
[email protected]> wrote:
> Hi Sriram,
>
> JaCoCo should be fine with JAR files, it will automatically read classe
> files from it. Works even recursively e.g for JAR files in WAR files.
>
> To help you it would be useful to see the full error message. There should
> be more text after "Error while creating report" with the exact technical
> details.
>
> Regards,
> -marc
>
> On 31.10.16 13:09, [email protected] wrote:
>
>> Hi Marc,
>>
>> As you mentioned, I have used Jacoco.exec and the class files of our
>> product. Coverage Report is successfully generated. But for this, I needed
>> to extract the jars and unzip them and point to that folder. But, in our
>> installation, we only have jar files and class files are not visible,
>> unless we explicitly unzip them.
>>
>> I tried to include jars but, I always get an error "Error while creating
>> report"
>>
>> Is there a way that I can generated Code coverage reports for jars but
>> not classes? Iam adding my target code for your convenience.
>>
>> ***********************************************
>> <target name="report">
>> <mkdir dir="${jacoco.report.dir}"/>
>> <jacoco:report>
>> <executiondata>
>> <file file="${jacocoexec.fullpath}"/>
>> </executiondata>
>> <structure name="Code coverage
>> Report">
>> <classfiles>
>> <fileset dir="${classes.dir}" />
>> </classfiles>
>> <sourcefiles encoding="UTF-8">
>> <fileset file="${src.dir}/*.jar"/>
>> </sourcefiles>
>> </structure>
>> <html destdir="${jacoco.report.dir}"/>
>> <csv destfile="${jacoco.report.dir}/report.csv"/>
>> <xml destfile="${jacoco.report.dir}/report.xml"/>
>> </jacoco:report>
>> </target>
>> *************************************************
>> Thanks already,
>>
>> Always B happy,
>> Sriram
>>
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/jacoco/Dsm1n7HwLFo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/jacoco/f71c275a-d99b-90cb-0892-76af21822e6c%40mountainminds.com.
> 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/CADCxQoPAe%3DbsgJg2Mz3PaNH9ZjAHJC10di%3DVP5G2%3DBM-zZWNpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.