You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2020/09/29 19:29:53 UTC

[GitHub] [sling-parent] raducotescu opened a new pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

raducotescu opened a new pull request #11:
URL: https://github.com/apache/sling-parent/pull/11


   * define a project property that provides the JaCoCo agent path
   * define default configurations for `surefire` and `failsafe` which use the JaCoCo agent to collect coverage


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] ghenzler commented on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
ghenzler commented on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-701289535


   I think for https://github.com/apache/sling-parent/blob/439bb3f192f51e1cbd69d5b3ae5bdb2c7423c92b/pom.xml#L720 we use a non-standard location for the full report xml - if we wanted SonarQube to import that I think we have to set `sonar.coverage.jacoco.xmlReportPaths` (see https://community.sonarsource.com/t/coverage-test-data-importing-jacoco-coverage-report-in-xml-format/) - it might be easier to generate the xml just to the default location (then no SonarQube config is needed)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] raducotescu commented on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
raducotescu commented on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-701244572


   I've played with the snapshot version of the pom in the GraphQL Core project and I do see the JaCoCo XML report produced i the correct location. This simplifies the setup a lot for projects inheriting the settings from the parent pom: the IT setup for each project needs to pass the value stored in the `jacoco.command` system property to the forked JVM and collecting coverage after that is as simple as running `mvn clean verify -Pjacoco-report`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] kwin edited a comment on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
kwin edited a comment on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-701357708


   @ghenzler What is the default location? I think you always need to specify that parameter, at least there are no defaults documented in https://sonarcloud.io/documentation/analysis/coverage/.
   
   Update: Found now 
   > By default the generated report will be saved under target/site/jacoco/jacoco.xml; this location will be checked automatically by the sonar-jacoco plugin so no further configuration is required. 
   
   (https://community.sonarsource.com/t/coverage-test-data-importing-jacoco-coverage-report-in-xml-format/12151)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] bdelacretaz commented on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
bdelacretaz commented on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-701290884


   FWIW the existing stuff in the this parent pom is very old and IIRC when I wrote it we didn't use SonarQube yet, it was just meant for developer use. 
   
   So don't be shy in changing as much as needed to "modernize" things.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] kwin commented on a change in pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
kwin commented on a change in pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#discussion_r497332107



##########
File path: sling-parent/pom.xml
##########
@@ -555,6 +558,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>

Review comment:
       There is already config for maven-surefire and maven-failsafe in line 340f




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] ghenzler commented on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
ghenzler commented on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-701429412


   > That's already handled by [apache/sling-tooling-jenkins@bd97a2a#diff-73dbfe33a23fd613048b067ac78dd258R40](https://github.com/apache/sling-tooling-jenkins/commit/bd97a2afd3f32b82985181bd1a7e44f4ca874be3#diff-73dbfe33a23fd613048b067ac78dd258R40). @ghenzler , do you see any value in changing this again?
   
   @raducotescu thanks for pointing out, should be good then IMHO (wasn't aware that it's added in Jenkins at command line, I thought you would have this in the pom)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] raducotescu commented on a change in pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
raducotescu commented on a change in pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#discussion_r497334990



##########
File path: sling-parent/pom.xml
##########
@@ -555,6 +558,27 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>

Review comment:
       Yes, but that's in the `<pluginManagement>` section. The reports are generated only in the `jacoco-report` profile, so I didn't want to add the `jacoco.command` property in the generic config, since then the property will be empty and could lead to issues when running ITs.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] raducotescu commented on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
raducotescu commented on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-701354169


   > I think for
   > 
   > https://github.com/apache/sling-parent/blob/439bb3f192f51e1cbd69d5b3ae5bdb2c7423c92b/pom.xml#L720
   > 
   > we use a non-standard location for the full report xml - if we wanted SonarQube to import that I think we have to set `sonar.coverage.jacoco.xmlReportPaths` (see https://community.sonarsource.com/t/coverage-test-data-importing-jacoco-coverage-report-in-xml-format/) - it might be easier to generate the xml just to the default location (then no SonarQube config is needed)
   
   That's already handled by https://github.com/apache/sling-tooling-jenkins/commit/bd97a2afd3f32b82985181bd1a7e44f4ca874be3#diff-73dbfe33a23fd613048b067ac78dd258R40. @ghenzler , do you see any value in changing this again?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] sonarcloud[bot] commented on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-700934760


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_slin
 g-parent&pullRequest=11&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-parent&pullRequest=11&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-parent&pullRequest=11) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-parent&pullRequest=11&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-parent&pullRequest=11&metric=new_duplicated_lines_density&view=list)
   
   <img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] kwin commented on pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
kwin commented on pull request #11:
URL: https://github.com/apache/sling-parent/pull/11#issuecomment-701357708


   @ghenzler What is the default location? I think you always need to specify that parameter, at least there are no defaults documented in https://sonarcloud.io/documentation/analysis/coverage/.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [sling-parent] raducotescu merged pull request #11: SLING-9775 - Improve JaCoCo code coverage setup

Posted by GitBox <gi...@apache.org>.
raducotescu merged pull request #11:
URL: https://github.com/apache/sling-parent/pull/11


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org