Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: corrected sample for pipeline job

...

Code Block
node {
  git 'https://github.com/recena/maven-helloworld'
  sh "mvn clean clover2clover:setup test clover2clover:aggregate clover2clover:clover"
  step([
    $class: 'CloverPublisher',
    cloverReportDir: 'target/site',
    cloverReportFileName: 'clover.xml',
    healthyTarget: [methodCoverage: 1070, conditionalCoverage: 5080, statementCoverage: 1080], // optional, default is: method=70, conditional=80, statement=80
    unhealthyTarget: [methodCoverage: 550, conditionalCoverage: 2550, statementCoverage: 550], // optional, default is none
    failingTarget: [methodCoverage: 0, conditionalCoverage: 0, statementCoverage: 0]     // optional, default is none
  ])
 failingTarget: [methodCoverage: 0, conditionalCoverage: 0, statementCoverage: 0] ]}

Maven configuration with freestyle project

...

The maven2 ear packaging will break if you use the clover goal at any time during the same invokation invocation of maven if you ivoke invoke the package or later phases (as it will see artifacts artefacts without a classifier and with the clover classifier, get confused and give up)

To work around this, you should configurer configure your root pom to include the <packaging>ear</packaging> targets only when you are not using clover... how to do this:

...