java.lang.Exception: No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1]

Atlassian JIRA | Jeremy Owen [Atlassian] | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h3. Summary With automatic integration, Clover Results Collector tries to find clover.xml in the wrong subdirectory in a job that involves an Ant task when another non-VCS checkout task (e.g. Script) is present above it in the task order. The search pattern applied is: {{/target/site/clover/**/clover.xml}} (which is applicable for Maven tasks) Instead of: {{/clover/**/clover.xml}} (for Ant) Impact: Clover tab is not visible for a Job. Clover statistics are not available in build Metadata after the build. h3. Steps to Reproduce # Create a basic plan and job # Setup the following task order: ## Script ## Source code checkout ## Ant build # Go to the miscellaneous tab of the job and: ## Check 'Use Clover to collect Code Coverage for this build.' ## Enable 'Automatically integrate Clover into this build.' # Save (Regardless of if you've changed the clover integration setting. This should trigger the clover XML location to update incorrectly based on the first task) # Trigger a build h3. Expected Results Clover Results Collector tries to find clover.xml in the correct pattern for Ant: /clover/**/clover.xml h3. Actual Results The below exception is reported in atlassian-bamboo.log {noformat} [ExecuteBuildTask] Failed to execute plugin with class com.atlassian.bamboo.clover.builder.coverage.CloverBuildProcessor : ANT-JOB1-1 java.lang.Exception: No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1] at com.atlassian.bamboo.clover.builder.coverage.CloverBuildProcessor.call(CloverBuildProcessor.java:156) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:158) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:79) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) {noformat} Following is present in the build log: {noformat} Failed to execute plugin 'Clover Results Collector' with error: No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1] {noformat} h3.Workaround # Configure the plan and job. # Move the Ant task to the top of the job so it's the first task # Go to the miscellaneous tab of the job: ## Ensure 'Automatically integrate Clover into this build.' is checked. ## Save - regardless of whether changes are made to automatically integrate clover. This should trigger a path update with Ant as the first task. # Go back to the Task tab and return the Ant task to it's appropriate position in the job. (Don't save the miscellaneous tab again after you've moved Ant back down the task order)

    Atlassian JIRA | 9 months ago | Jeremy Owen [Atlassian]
    java.lang.Exception: No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1]
  2. 0

    h3. Summary With automatic integration, Clover Results Collector tries to find clover.xml in the wrong subdirectory in a job that involves an Ant task when another non-VCS checkout task (e.g. Script) is present above it in the task order. The search pattern applied is: {{/target/site/clover/**/clover.xml}} (which is applicable for Maven tasks) Instead of: {{/clover/**/clover.xml}} (for Ant) Impact: Clover tab is not visible for a Job. Clover statistics are not available in build Metadata after the build. h3. Steps to Reproduce # Create a basic plan and job # Setup the following task order: ## Script ## Source code checkout ## Ant build # Go to the miscellaneous tab of the job and: ## Check 'Use Clover to collect Code Coverage for this build.' ## Enable 'Automatically integrate Clover into this build.' # Save (Regardless of if you've changed the clover integration setting. This should trigger the clover XML location to update incorrectly based on the first task) # Trigger a build h3. Expected Results Clover Results Collector tries to find clover.xml in the correct pattern for Ant: /clover/**/clover.xml h3. Actual Results The below exception is reported in atlassian-bamboo.log {noformat} [ExecuteBuildTask] Failed to execute plugin with class com.atlassian.bamboo.clover.builder.coverage.CloverBuildProcessor : ANT-JOB1-1 java.lang.Exception: No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1] at com.atlassian.bamboo.clover.builder.coverage.CloverBuildProcessor.call(CloverBuildProcessor.java:156) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:158) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:79) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) {noformat} Following is present in the build log: {noformat} Failed to execute plugin 'Clover Results Collector' with error: No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1] {noformat} h3.Workaround # Configure the plan and job. # Move the Ant task to the top of the job so it's the first task # Go to the miscellaneous tab of the job: ## Ensure 'Automatically integrate Clover into this build.' is checked. ## Save - regardless of whether changes are made to automatically integrate clover. This should trigger a path update with Ant as the first task. # Go back to the Task tab and return the Ant task to it's appropriate position in the job. (Don't save the miscellaneous tab again after you've moved Ant back down the task order)

    Atlassian JIRA | 9 months ago | Jeremy Owen [Atlassian]
    java.lang.Exception: No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1]

    Root Cause Analysis

    1. java.lang.Exception

      No file matches the specified pattern:target/site/clover/**/clover.xml in [/var/bamboo-home/xml-data/build-dir/ANT-JOB1]

      at com.atlassian.bamboo.clover.builder.coverage.CloverBuildProcessor.call()
    2. com.atlassian.bamboo
      ImpersonationHelper$1.run
      1. com.atlassian.bamboo.clover.builder.coverage.CloverBuildProcessor.call(CloverBuildProcessor.java:156)
      2. com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:158)
      3. com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:79)
      4. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215)
      5. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139)
      6. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130)
      7. com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221)
      8. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129)
      9. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137)
      10. com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51)
      11. com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      12. com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      13. com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      13 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame