Generating clover reports from builds fail if the license location is not specified in the builder configuration

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

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:

[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:

<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:

<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:

  1. Append the license string in the pom.xml in a CDATA tag. In this case, there is no need to put a reference as suggested in Troubleshooting License problems.
  2. 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>

Last modified on Jun 21, 2013

Was this helpful?

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