[FOLIO-1974] Sonarqube's Maven plugin sonar.jacoco.reportPath is deprecated Created: 22/Apr/19  Updated: 03/Jun/20  Resolved: 06/May/19

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: John Malconian Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint: CP: sprint 62
Story Points: 2
Development Team: Core: Platform

 Description   

Matt Reno reports:

"Noticed this warning in SonarCloud on a recent build analysis: `Property 'sonar.jacoco.reportPaths' is deprecated (JaCoCo binary format). 'sonar.coverage.jacoco.xmlReportPaths' should be used instead (JaCoCo XML format).` This looks like a recent change:https://docs.sonarqube.org/display/PLUG/Java+Unit+Tests+and+Coverage+Results+Import"

Update the Jenkins pipeline script to use the new report path option.



 Comments   
Comment by Ian Hardy [ 02/May/19 ]

Opened https://github.com/folio-org/jenkins-pipeline-libs/pull/63

1. Adds a new goal the mvn build `org.jacoco:jacoco-maven-plugin:report`. This reads the `target/jacoco.exec` report and publishes it in xml,csv, and html. The xml report can be found here: `target/site/jacoco/jacoco.xml`
2. updates the code coverage report that sonar reads from the default jacoco.exec to `-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml`.

An example https://sonarcloud.io/dashboard?branch=folio-1974-testing&id=org.folio%3Aedge-sip2

Comment by Ian Hardy [ 02/May/19 ]

On second view of the example report--seems not quite right. Missing information the "Measures" and "Code" tabs i think.

Comment by David Crossley [ 03/May/19 ]

My investigation today does not reveal any new information. Your configuration seems correct.

The "Administration" section at SonarCloud does not report any problems in the "Background tasks".

Grasping at straws, but i wonder if those tabs are empty because there were not actually any code changes in your branch. Perhaps test with an actual code change.

Not any help sorry.

Comment by Ian Hardy [ 03/May/19 ]

Thanks for the suggestion David, I added a bug and it's looking better to me now:

https://sonarcloud.io/dashboard?branch=folio-1974-testing&id=org.folio%3Aedge-sip2

Comment by Ann-Marie Breaux (Inactive) [ 05/May/19 ]

Ian Hardy Hi Ian - this showed up in the manual testing queue, but I don't think there's anything for us to test, is there? Please review and close or change its status to something else - thank you!

Comment by David Crossley [ 06/May/19 ]

Ah, yes. i changed the Status to "In Code Review".

Ian – Excellent. That test code change did the trick.

Comment by Ian Hardy [ 06/May/19 ]

Thanks David Crossley and Ann-Marie Breaux Correct, nothing to test.

Generated at Thu Feb 08 23:17:16 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.