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

9 views
Skip to first unread message

jbennett2091@yahoo.com (JIRA)

unread,
Oct 16, 2019, 9:46:03 PM10/16/19
to jenkinsc...@googlegroups.com
Jeffrey Bennett created an issue
 
Jenkins / Bug JENKINS-59813
JacocoPublisher (part of pipeline-maven) does not deal with excludes properly
Issue Type: Bug Bug
Assignee: Alvaro Lobato
Components: pipeline-maven-plugin
Created: 2019-10-17 01:45
Priority: Major Major
Reporter: Jeffrey Bennett

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jbennett2091@yahoo.com (JIRA)

unread,
Oct 22, 2019, 10:40:02 AM10/22/19
to jenkinsc...@googlegroups.com
Jeffrey Bennett commented on Bug JENKINS-59813
 
Re: JacocoPublisher (part of pipeline-maven) does not deal with excludes properly

Found a work-around of sorts.   Completely disable the JacocoPublisher and use the external 'jacoco' step instead.  Since the latter accepts exclude, it can be properly configured.  If you don't disable the JacocoPublisher, you wind up with two similar looking reports in Jenkins.

cleclerc@cloudbees.com (JIRA)

unread,
Nov 15, 2019, 5:29:03 AM11/15/19
to jenkinsc...@googlegroups.com

cleclerc@cloudbees.com (JIRA)

unread,
Nov 16, 2019, 6:01:03 AM11/16/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages