Hi Aruna, I guess that this is related to the fact that tests and main code are located in different modules. We have an open ticket for such case - https://github.com/jacoco/jacoco/pull/217 . As a workaround you can use Ant Task - this is what actually is done in build of JaCoCo see ( https://github.com/jacoco/jacoco/blob/master/org.jacoco.doc/pom.xml#L89 ).
Best regards On Wednesday, August 26, 2015 at 11:29:57 AM UTC+2, [email protected] wrote: > > On Wednesday, August 26, 2015 at 1:53:12 PM UTC+5:30, [email protected] > wrote: > > Hi all, > > > > I have configured jacoco plugin as follows. And my project structure as > below. There is a parent pom and two modules as core and tests. core > contains all the source files. tests contains the test cases. > > > > parent --> core > > --> tests > > > > I can see that, jacoco.exec file contain some data. Any idea whats went > wrong here?.. Is this because source is in another module?. > > > > > > <plugin> > > <groupId>org.jacoco</groupId> > > <artifactId>jacoco-maven-plugin</artifactId> > > <executions> > > <execution> > > <id>default-prepare-agent</id> > > <goals> > > <goal>prepare-agent</goal> > > </goals> > > <configuration> > > > <!--<dataFile>target/jacoco.exec</dataFile>--> > > > > <includes> > > <include>org.sample*</include> > > </includes> > > </configuration> > > </execution> > > <execution> > > <configuration> > > <includes> > > <include>org.sample*</include> > > </includes> > > <dataFile>target/jacoco.exec</dataFile> > > </configuration> > > <id>default-report</id> > > <phase>prepare-package</phase> > > <goals> > > <goal>report</goal> > > </goals> > > </execution> > > <execution> > > <id>default-check</id> > > <goals> > > <goal>check</goal> > > </goals> > > <configuration> > > <rules> > > <rule> > > </rule> > > </rules> > > </configuration> > > </execution> > > </executions> > > </plugin> > > > > Regards, > > Aruna > > By the way my test cases are running in a pax-exam container. Is this an > issue?. > -- 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/3be44b9d-d2b3-4a5c-b850-f18c48c2b5fc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
