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

Cobertura plugin should not fail maven build for maven release

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The cobertura plugin does not play well with maven builds when a maven release is performed

      See https://issues.jenkins-ci.org/browse/JENKINS-4399 where teilo says "Personally I consider this a defect in the corbetrura and clover plugins that
      fails the build if the report isn't there - it should check that the mojo was run during the build and only fail if it ran and the report was empty."

      The plugin works fine for a normal maven build, but when using the "Jenkins Maven Release Plug-in Plug-in" to release a maven build, the cobertura reports would/should not normally be generated but the cobertura plugin fails the release build.

      For example:
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] aaa-client-parent ............................. SUCCESS [1:30.340s]
      [INFO] aaa-client .................................... SKIPPED cobertura report created here normally but skipped for a release
      [INFO] aaa-client-integration-test ................... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1:31.727s
      [INFO] Finished at: Thu Feb 02 12:57:08 GMT 2012
      [INFO] Final Memory: 17M/146M
      [INFO] ------------------------------------------------------------------------

      Publishing Cobertura coverage report...
      No coverage results were found using the pattern '**/target/site/cobertura/coverage.xml' relative to '...'. Did you enter a pattern relative to the correct directory? Did you generate the XML report(s) for Cobertura?
      Build step 'Publish Cobertura Coverage Report' changed build result to FAILURE

        Attachments

          Issue Links

            Activity

            Show
            plaflamme Philippe Laflamme added a comment - https://github.com/jenkinsci/cobertura-plugin/pull/6
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Philippe Laflamme
            Path:
            src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
            http://jenkins-ci.org/commit/cobertura-plugin/dd2ace3eada76f06e74cbb763f613298acb3413f
            Log:
            Fixing JENKINS-12640

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Philippe Laflamme Path: src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java http://jenkins-ci.org/commit/cobertura-plugin/dd2ace3eada76f06e74cbb763f613298acb3413f Log: Fixing JENKINS-12640
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Seiji Sogabe
            Path:
            src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
            http://jenkins-ci.org/commit/cobertura-plugin/85bcedd888fc40f9a80800cc33705a5954f565e5
            Log:
            Merge pull request #6 from plaflamme/jenkins-12640

            Fixing JENKINS-12640

            Compare: https://github.com/jenkinsci/cobertura-plugin/compare/05dd959...85bcedd

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java http://jenkins-ci.org/commit/cobertura-plugin/85bcedd888fc40f9a80800cc33705a5954f565e5 Log: Merge pull request #6 from plaflamme/jenkins-12640 Fixing JENKINS-12640 Compare: https://github.com/jenkinsci/cobertura-plugin/compare/05dd959...85bcedd
            Hide
            sogabe sogabe added a comment -

            fix in 1.4

            Show
            sogabe sogabe added a comment - fix in 1.4
            Hide
            croesus Croesus Kall added a comment -

            Just in case someone runs into this again.

            In version 1.8 of the cobertura plugin an option was added in the "Publish Cobertura Coverage Report" configuration:

            • Advanced -> Fail if no reports
              Leave it unchecked in order to make the maven release plugin play nice.

            ref: https://github.com/jenkinsci/cobertura-plugin/commit/46f5af5abf7750f751231fd32239fce7bd982fc4, JENKINS-14552

            Show
            croesus Croesus Kall added a comment - Just in case someone runs into this again. In version 1.8 of the cobertura plugin an option was added in the "Publish Cobertura Coverage Report" configuration: Advanced -> Fail if no reports Leave it unchecked in order to make the maven release plugin play nice. ref: https://github.com/jenkinsci/cobertura-plugin/commit/46f5af5abf7750f751231fd32239fce7bd982fc4 , JENKINS-14552

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                azzoti TIm Azzopardi
              • Votes:
                5 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: