Hi All,
I'm trying to generate coverage by excluding com.sun.* classes. Only one jar containing com.sum.* packages is there in the server. I've excluded that jar from coverage report by filter out all jar files and passing the jar names to analyzeAll method though a loop when generating the report.
Note that I'm using modified version of ReportGenerator at [1]
analyzer.analyzeAll(file);
Also excluded that particular patten from -javaagent option.
-javaagent:/Users/krishantha/git/wso2/product-as/modules/integration/tests-integration/tests/target/jacoco/agent/jacocoagent.jar=destfile=/Users/krishantha/git/wso2/product-as/modules/integration/tests-integration/tests/target/jacoco.exec,append=true,includes=org.test.myapp*:org.addressing*:org.test.application.deployer*:,excludes=com.sun**:org.eclipse.*:*.equinox.*,classdumpdir=/Users/krishantha/Desktop/test \
Also I have dump all classes to a directory and no com.sun classes are there.
However still my report contain com.sun packages.
Any help to exclude the classes properly will be appreciated.
Sample report is given below
=============================
Element Missed Instructions Cov. Missed Branches Cov. Missed Cxty Missed Lines Missed Methods Missed Classes
\
com.sun.activation.registries 3,976 0% 516 0% 368 368 492 492 104 104 14 14
com.sun.activation.viewers 1,054 0% 0% 62 62 149 149 44 44 8 8
com.sun.codemodel 10,994 0% 1,042 0% 1,246 1,246 2,325 2,325 724 724 80 80
com.sun.codemodel.fmt 0% 0% 46 46 105 105 36 36 9 9
com.sun.codemodel.util 2,086 0% 120 0% 107 107 222 222 47 47 9 9
[1]
http://www.eclemma.org/jacoco/trunk/doc/examples/java/ReportGenerator.java
Thanks,
Krishantha.