org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory

Atlassian JIRA | Marek Parfianowicz [Atlassian] | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [CLOV-1144] Support *.groovy files in src/main/java folder for groovy-eclipse-plugin - Atlassian JIRA

    atlassian.com | 1 year ago
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory
  2. 0

    *Problem:* Clover fails during instrumentation of *.groovy files in case when sources are put in src/main/java directory, instead of src/main/groovy and when the groovy-eclipse-plugin is used. *Steps to reproduce:* * create a project with groovy-eclipse-plugin and maven-clover2-plugin * put a *.groovy file inside src/main/java * run build *Expected error:* {noformat} [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.201s [INFO] Finished at: Mon Sep 10 10:16:48 CDT 2012 [INFO] Final Memory: 7M/18M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrumentSources(AbstractInstrumenter.java:197) at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrument(AbstractInstrumenter.java:72) at com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:309) at com.atlassian.maven.plugin.clover.CloverSetupMojo.execute(CloverSetupMojo.java:31) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException *** ERROR: No source files specified USAGE: com.cenqua.clover.CloverInstr [OPTIONS] PARAMS [FILES...] {noformat} A reason is that Java compiler is involved here, Clover is called, it filters out all files which do not have *.java extension and as a consequence it passes wrong argument to CloverInstr. *Solution:* 1) Add check to AbstractInstrumenter (maven-clover2-plugin) so it does not call CloverInstr in case no matching files are found 2) Add support for src/main/java, src/test/java directories for Groovy - probably in GroovySourceScanner + CloverInstrumentInternalMojo *Workaround:* Put Groovy files in correct location i.e. src/main/groovy - they'll be handled correctly by Clover. *Background:* According to groovy-eclipse-plugin documentation, they recommend putting groovy files inside java folder - it's not nice, but it's the fastest set-up. http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven

    Atlassian JIRA | 4 years ago | Marek Parfianowicz [Atlassian]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory
  3. 0

    *Problem:* Clover fails during instrumentation of *.groovy files in case when sources are put in src/main/java directory, instead of src/main/groovy and when the groovy-eclipse-plugin is used. *Steps to reproduce:* * create a project with groovy-eclipse-plugin and maven-clover2-plugin * put a *.groovy file inside src/main/java * run build *Expected error:* {noformat} [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.201s [INFO] Finished at: Mon Sep 10 10:16:48 CDT 2012 [INFO] Final Memory: 7M/18M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrumentSources(AbstractInstrumenter.java:197) at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrument(AbstractInstrumenter.java:72) at com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:309) at com.atlassian.maven.plugin.clover.CloverSetupMojo.execute(CloverSetupMojo.java:31) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException *** ERROR: No source files specified USAGE: com.cenqua.clover.CloverInstr [OPTIONS] PARAMS [FILES...] {noformat} A reason is that Java compiler is involved here, Clover is called, it filters out all files which do not have *.java extension and as a consequence it passes wrong argument to CloverInstr. *Solution:* 1) Add check to AbstractInstrumenter (maven-clover2-plugin) so it does not call CloverInstr in case no matching files are found 2) Add support for src/main/java, src/test/java directories for Groovy - probably in GroovySourceScanner + CloverInstrumentInternalMojo *Workaround:* Put Groovy files in correct location i.e. src/main/groovy - they'll be handled correctly by Clover. *Background:* According to groovy-eclipse-plugin documentation, they recommend putting groovy files inside java folder - it's not nice, but it's the fastest set-up. http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven

    Atlassian JIRA | 4 years ago | Marek Parfianowicz [Atlassian]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.1.7:setup (default-cli) on project test.project: Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.maven.plugin.MojoExecutionException

      Clover has failed to instrument the source files in the [C:\workspaces\workspace\TestProject\target\clover\src-instrumented] directory

      at com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrumentSources()
    2. com.atlassian.maven
      CloverSetupMojo.execute
      1. com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrumentSources(AbstractInstrumenter.java:197)
      2. com.atlassian.maven.plugin.clover.internal.instrumentation.AbstractInstrumenter.instrument(AbstractInstrumenter.java:72)
      3. com.atlassian.maven.plugin.clover.CloverInstrumentInternalMojo.execute(CloverInstrumentInternalMojo.java:309)
      4. com.atlassian.maven.plugin.clover.CloverSetupMojo.execute(CloverSetupMojo.java:31)
      4 frames
    3. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      1 frame
    4. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      9 frames
    5. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      3 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    7. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      4 frames