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


> On 4. Sep 2019, at 08:01, Vineet Gairola <[email protected]> wrote:
> 
> 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
> 
> 
> 
> -- 
> 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]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/928cf8df-114d-497a-aea1-5641a8761f1a%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/928cf8df-114d-497a-aea1-5641a8761f1a%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/7CAD6732-6CC6-461C-A863-ED8A10257199%40mountainminds.com.

Reply via email to