Currently, it's planned to deliver the feature in two steps:
- Bamboo 5.8 - changes in Bamboo Clover Plugin UI
- Bamboo 5.9 - enabling this feature by upgrading dependency to Clover 4.0.3+
A build can fail during test execution in case when Automatic Clover integration is used and the project is a Maven project with multiple modules having dependencies between each other.
Maven goal is called: clean test. Compilation order will be:
What happens when Automatic Clover integration is enabled? Goals are enhanced as follows: clean test clean clover2:setup verify clover2:aggregate clover2:clover. What happens? A compilation is as follows:
Issue affects all Bamboo versions.
1) Analyze which goals are defined in Maven task. Next add Clover goals in between:
- add "clover2:setup" after the "clean" (if present) and before other goals
- but "jaxb2:generate clover2:setup"
- but "wsdl2java clover2:setup"
- what to do in case when "install" or "deploy" phase is declared? deploying instrumented JARs shall be avoided in general
- write help for "automatically integrate clover" radio button?
- write warning in UI if such goals are found?
- write warning in a build log if such goals are found?
- add "clover2:aggregate clover2:clover" after all goals
2) Alternatively, call Clover first and clean everything after Clover finishes, e.g. something like:
but this causes a problem that all Clover reports will be wiped out after last clean. They'd have to be stored somewhere.
3) Alternatively, we could add an extra Maven task at the end of the Job with would run "clean" + Clover goals. But this would change build configuration.