Generating clover reports from builds fail if the license location is not specified in the builder configuration
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
After adding the Clover license to Bamboo and adding the Clover plugin to the builder (e.g., you have added it to your pom in the case of a Maven builder), the build fails with the following warning in atlassian-bamboo.log
:
1
2
3
4
5
6
7
8
9
10
2013-04-23 22:01:54,534 WARN [7-BAM::Default Agent::Agent:pool-16-thread-1] [ExecuteBuildTask] Failed to execute plugin with class com.atlassian.bamboo.builder.coverage.CloverBuildProcessor : TESTA-TSTA-JOB1-11
java.lang.Exception: No file matches the specified pattern:**/clover.xml in [D:\atlassian\BAMBOO\atlassian-bamboo-4.4.5\HOME\xml-data\build-dir\TESTA-TSTA-JOB1]
at com.atlassian.bamboo.builder.coverage.CloverBuildProcessor.call(CloverBuildProcessor.java:141)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:164)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:90)
at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:206)
at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103)
at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:111)
at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
at java.lang.Thread.run(Thread.java:722)
The build log shows the following error:
1
2
3
4
5
6
[ERROR] Failed to execute goal
com.atlassian.maven.plugins:maven-clover2-plugin:3.1.10:setup
(default-cli) on project webapplication: Execution default-cli of goal
com.atlassian.maven.plugins:maven-clover2-plugin:3.1.10:setup failed:
Your license has expired..Please visit http://www.atlassian.com to
obtain a license. -> [Help 1]
Cause
This is caused by the fact that the license location needed to be specified in the pom file as described in Troubleshooting License problems. The license added to Bamboo is to be able to parse already prepared Clover reports.
Resolution
Rather than installing the Clover plugin as:
1
2
3
4
5
6
7
8
9
10
11
12
<build>
<plugins>
...
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>${clover.version}</version>
</plugin>
...
</plugins>
</build>
Please try something like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
<build>
<plugins>
...
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>${clover.version}</version>
<licenseLocation>/path/to/clover.license</licenseLocation>
</plugin>
...
</plugins>
</build>
Note:
In case where the build will be run from a Remote Agent, then it will not be feasible to specify a unified license location in the POM. In such case, please try the following options:
Append the license string in the
pom.xml
in aCDATA
tag. In this case, there is no need to put a reference as suggested in Troubleshooting License problems.Add the license in the repository which will be checked out to the working directory and use something like this in the POM:
<licenseLocation>./clover.license</licenseLocation>
Was this helpful?