jacoco report does not generate on the basis of selective location of Java class files.

25 views
Skip to first unread message

Vineet Gairola

unread,
Sep 4, 2019, 2:01:07 AM9/4/19
to JaCoCo and EclEmma Users
I tried to generate a jacoco report from command line interface using commands:


classfiles=$(cat files.txt | sed 's/^/--classfiles /g' | tr '\n' ' ')

java -jar "C:\tools\jacoco-0.8.4\lib\jacococli.jar" report "C:\tools\jacoco-0.8.4\Jacoco.exec" ${classfiles} --html report --name jacoco-report --sourcefiles  <path>

Here files.txt contains all the jar files of the application.

Issue here is that if I try to generate a report supplying only selective class files through files.txt instead of all the jar files, my expectation is that the final report should only show these selective files and not overall files of the application, however the final report shows all classes and packages irrespective of the files we have supplied to generate a report.

Kindly help in this regards.

Regards
Vineet


Marc Hoffmann

unread,
Sep 5, 2019, 12:52:55 AM9/5/19
to jac...@googlegroups.com
Hi Vineet,

JaCoCo does not support filtering classes in Jar files. The report will show coverage information for all classes in the Jars.

If you working with shell scripts a possible solution is to unzip the Jar files into a directory and remove all unwanted class files.

Regards,
-marc


--
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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/928cf8df-114d-497a-aea1-5641a8761f1a%40googlegroups.com.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages