0

I am trying to exclude code in jococo. I have given for the package that I want to exclude and vice versa tags in my code for the package that I want to include.

but still ECLEMMA while junit coverage is reading whole code i.e. all packages and hence my code coverage goes down.

Here is my code:

              <includes>
               <include>com.cfgh.controller.*</include>
               <include>com.cfgh.service.*</include>
               <include>com.cfgh.repository.*</include>
              </includes>

               <excludes>
               <exclude>com.cfgh.config.*</exclude>
               <exclude>com.cfgh.model.dto.*</exclude>
               <exclude>com.cfgh.model.entity.*</exclude>
               <exclude>com.cfgh.repository.*</exclude>
               <exclude>com.cfgh.exception.handler.*</exclude>

The include and exclude tags appear in green in pom.xml file, but still it is not reading it. Can someone please guide me here in right direction.Thanks in advance

Godin
  • 9,801
  • 2
  • 39
  • 76
Ruchita J
  • 23
  • 7
  • Possible duplicate of [Coverage exclusion in Eclipse \[EclEmma\] is not working?](https://stackoverflow.com/questions/47703999/coverage-exclusion-in-eclipse-eclemma-is-not-working) – Godin Mar 27 '18 at 22:13
  • While EclEmma under the hood uses JaCoCo, it doesn't read jacoco-maven-plugin configuration. As of today there is no way to exclude packages in EclEmma. Exclusions specified for jacoco-maven-plugin affect only report generated by it. – Godin Mar 27 '18 at 22:16

0 Answers0