As indicated we are using jacoco.exec for code coverage.
The Aggregate Reports XML reports I just added when debugging the missing 
code coverage issue and is as I stated is not working properly, probably 
for the reasons you pointed out.

I'll reply again when I have a MVP that reproduces this issue.

-Rob
 

On Monday, June 8, 2020 at 11:01:43 AM UTC-4, Marc R. Hoffmann wrote:
>
>
> You’re using report-aggregate. This goal requires as separate module for 
> the report. Please see documentation:
>
> https://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html
>
> On the other hand if you use Sonar with exec files there is no need to 
> create reports at all.
>
> Regards,
> -marc
>
>
> On 8. Jun 2020, at 16:26, the.ro...@gmail.com <javascript:> wrote:
>
> We are appending the jacoco.exe files. The settings are defined in the top 
> level parent pom.
>
>     <plugin>
>       <groupId>org.jacoco</groupId>
>       <artifactId>jacoco-maven-plugin</artifactId>
>       <version>${jacoco.version}</version>
>       <configuration>
>          <destFile>${sonar.jacoco.reportPaths}</destFile>
>          <append>true</append>
>       </configuration>
>       <executions>
>          <execution>
>             <id>agent</id>
>             <goals>
>                <goal>prepare-agent</goal>
>             </goals>
>          </execution>
>          <execution>
>             <phase>test</phase>
>             <goals>
>                <goal>report-aggregate</goal>
>             </goals>
>          </execution>
>       </executions>
>    </plugin>
>
> </plugins>
>
> We build with full debug: lines,vars,source
> We were experimenting with the XML format but we haven't worked out the 
> kinks yet.
>
>
> We actually have 5 applications,2 wars , 3 schedules deployed as zip 
> files, over 58 poms, and this is  only project that is displaying issues.
> I'll work on creating a GitHub project that reproduces this issue.
>
> Thanks for your time.
>
> On Monday, June 8, 2020 at 8:59:29 AM UTC-4, Marc R. Hoffmann wrote:
>>
>> 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, the.ro...@gmail.com 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 jac...@googlegroups.com.
>> 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 jac...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/dce20da3-57b8-4509-b749-9643b027ac73o%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/dce20da3-57b8-4509-b749-9643b027ac73o%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 jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/bc03d2bf-ec20-45f4-b37f-4d7dcf4345c1o%40googlegroups.com.

Reply via email to