Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59813

JacocoPublisher (part of pipeline-maven) does not deal with excludes properly

    • 1381.v08b_63fa_30559

      The jacoco report published by pipeline indicates classes that should have been excluded.

       

      Our build, a multi-module maven build executes jacoco on multiple modules.  In the POM, we indicate <exclude> on a number of classes (generated java).  When built by maven (command-line), the jacoco report is properly created - excluded files are properly excluded.  When we wrapper this build into a jenkinsfile and invoke it via a withMaven(..), the JacocoPublisher kicks in.  The jacoco report on the Jenkins job appears to include the excluded files.  It looks to me like JacocoPublisher is reinvoking Jacoco-Plugin with default parameters. The Jacoco-Plugin output shows a blank line for 'exclude', which explains why the report has things it should not.

      I suspect the easiest solution is to offer a parameter on JacocoPubisher that would pass-through to the Jacoco-Plugin.  This would allow people to write Jenkinsfiles, enter the 'excludes' they desire, and Jacoco-Plugin would then run properly.

          [JENKINS-59813] JacocoPublisher (part of pipeline-maven) does not deal with excludes properly

          Jeffrey Bennett created issue -
          Cyrille Le Clerc made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]
          Arnaud Héritier made changes -
          Assignee Original: Alvaro Lobato [ alobato ]
          Eric Norman made changes -
          Remote Link New: This issue links to "GH Pull Request 764 (Web Link)" [ 29498 ]
          Benoit made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Benoit made changes -
          Assignee New: Benoit [ bguerin ]
          Benoit made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Benoit made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]
          Benoit made changes -
          Released As New: 1381.v08b_63fa_30559
          Status Original: Fixed but Unreleased [ 10203 ] New: Closed [ 6 ]

            bguerin Benoit
            jbennett20912 Jeffrey Bennett
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: