Hi, how are you creating code coverage reports? Note that the prepare-agent and report goals work in the scope of individual modules. So there should be a separate exec file and report in every module.
If you have a different setup please share a minimal reproducer so we can understand what exactly you’re doing. Regards, -marc > On 5. Jun 2020, at 02:52, [email protected] wrote: > > Desired Outcome > > Our maven project generates 2 applications/war files. The binary jacoc.exec > is uploaded to SonarQube. > > A Simplified structure looks like: > > Parent (pom) > App1 (pom) > app1-common (jar) > app1-core (jar) > app1-webapp(war) - Contains java code > > App2 (pom) > app2-common(jar) > app2-core(jar) > app2-webapp(war) - Contains no java code > > We expect to see code and coverage for all maven modules that contain java > code but noticed that code and coverage information was entirely missing > app2-common(jar) > app2-core(jar) > > > > We searched through the jacoco.exec file to verify that none of the classes > were present, just to make sure. > > If in the App2 aggregate pom we remove the app2-webapp module : > > Parent (pom) > App1 (pom) > app1-common (jar) > app1-core (jar) > app1-webapp(war) - Contains java code > App2 (pom) > app2-common(jar) > app2-core(jar) > > the code coverage for > app2-common > app2-core > > is displayed as expected. > > In the app2-webapp pom we tried adding > <properties> > <jacoco.skip>true<jacoco.skip> > <maven.test.skip>true</maven.test.skip> > </properties> > > We also tried changing app2-webapp(war) to app2-webapp(jar) > Removing all of the maven plugins from app2-webapp > and limiting the dependencies to only > app2-common(jar) > app2-core(jar) > > but still the code coverage for > app2-common(jar) > app2-core(jar) > Is missing. > > Environment: Jenkins CentOS 7 and Oracle Java 8u151 , Jacoco 0.8.5 uploading > to SonarQube 7.X > > I have also tried using jacoco 0.7.9 with the same results. > > Does anyone know what I am missing ? > > > > > -- > 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/7dfb7294-8f79-4751-8c37-449dad009167o%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/7dfb7294-8f79-4751-8c37-449dad009167o%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/E51EDBFB-5FDF-4156-BA3F-23E05BBB51CD%40mountainminds.com.
