Unable to publish artifact "Clover Report (System)"

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Bamboo with Clover is used. Clover HTML report artifact is empty after the build. Build log contains an error message like this:

Unable to publish artifact [Clover Report (System)]: the source directory <bamboo_home>\xml-data\build-dir\AA-BB-JOB1\target\site\clover does not exist.

Cause

1) Build has failed causing that not all Clover's goals have been called

Example:

  • the "Automatically integrate Clover into this build" option is enabled
  • automatic Clover integration adds extra goals to the maven command line, such as "clover:setup verify clover:aggregate clover:clover"
  • a build fails in the test phase due to test failures
  • Maven breaks the build, as a consequence latter goals (clover:aggregate clover:clover) are not called, Clover reports are not generated
  • as reports are unavailable, the "Unable to publish artifact" error appears at the end of the build

or

2) Clover reports were written do a directory different than defined in a "Clover Report" artifact

Example:

  • the "Automatically integrate Clover into this build" option is enabled
  • the "Clover Report (System)" artifact is defined with a standard pattern (target/site/clover + **/*, for instance)
  • a build succeeds and a build log shows that Clover reports have been generated
  • but build was configured to run in a sub-directory (see Bamboo > Job configuration > Maven Task > Working directory field, for instance)
  • and as a consequence, Clover's reports have been written to "<working directory>/target/site/clover", which does not match the location from artifact definition

Resolution

ad 1) Do not fail a build in case of test failures

  • set the maven.test.failure.ignore=true property for Surefire plugin or
  • set the setTestFailureIgnore=true property for Clover plugin (which sets several common properties)

 

ad 2) Correct location of reports

  • either correct definition of the "Clover Report (System)" artifact
  • or define custom location for Clover reports in Maven Task - see the clover:setup goal

 

Last modified on Dec 8, 2015

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.