-
Type:
Suggestion
-
Resolution: Fixed
-
Component/s: Documentation
-
None
The problem is that if 'mvn deploy' is used with Clover, it will deploy instrumented JARs into repository. There's no documentation on confluence.atlassian.com in the BAMBOO space how such separation can be achieved.
Create a page with a description like:
If you use "Automatically integrate Clover into this build" option, then Bamboo will add clover2:setup + clover2:clover goals into every Maven task found in the Job (more details can be found here). It means that you shall not use "mvn deploy" together with automatic Clover integration.
There are at least three ways to solve this problem:
1) Create a separate Plan (or Job) in which automatic Clover integration is enabled and the Maven 2.x task does not deploy artifacts ("mvn verify" is used for instance). So this plan would be used only for Clover reporting.
Benefits: full Clover separation from the Plan (or Job) performing deployment
Drawbacks: doubled Plan (or Job)
or
2) Use manual Clover integration ("Clover is already integrated into this build") but run Clover in a parallel build lifecycle. It means that you'd have to configure Clover goals manually in the pom.xml and use the "clover2:instrument" instead of "clover2:setup". You could have then just one Maven task with "mvn clean deploy". Instrumented jars would have -clover.jar suffix.
Benefits: build is executed only once
Drawbacks: sometimes there might be problems with resolving correct ("cloverized") dependent artifacts for multi-module projects or deploying the instrumented war to test server
or
3) Use manual Clover integration, but run Clover in a default build lifecycle. It means that you'd have to configure Maven task manually and use "clover2:setup" goal. Then you have to use two Maven tasks - one with "... clover2:setup test ..." and one with "deploy". This is an approach you have followed (according to screenshots I see in attached pdf).
Benefits: no problems with artifact dependencies
Drawbacks: two Maven tasks
Recommendation: approach #3.
Steps for approach #3:
clean clover2:setup test clover2:aggregate clover2:clover
b) define "Clover Report" artifact
On the 'Artifacts' tab, click Create Definition and complete the form as follows:
Name This should begin with with "Clover Report".
Location This should point to the HTML report directory (e.g. target/site/clover)
Copy Pattern Use */.*
More details on https://confluence.atlassian.com/display/BAMBOO/Enabling+the+Clover+add-on#EnablingtheCloveradd-on-ManualCloverintegration