Hi i want to generate emma report using maven.when i try to build report it gives this error.
[ERROR] Failed to execute goal org.codehaus.mojo:emma-maven-plugin:1.0-alpha-3:instrument (default) on project point-repo: Execution default of goal org.codehaus.mojo:emma-maven-plugin:1.0-alpha-3:instrument failed: CONSTANT_info: invalid tag value [18] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:emma-maven-plugin:1.0-alpha-3:instrument (default) on project point-repo: Execution default of goal org.codehaus.mojo:emma-maven-plugin:1.0-alpha-3:instrument failed: CONSTANT_info: invalid tag value [18]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
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.MojoExecutor.executeForkedExecutions(MojoExecutor.java:364)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:198)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.codehaus.mojo:emma-maven-plugin:1.0-alpha-3:instrument failed: CONSTANT_info: invalid tag value [18]
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 23 more
Caused by: java.lang.IllegalStateException: CONSTANT_info: invalid tag value [18]
at com.vladium.jcd.cls.constant.CONSTANT_info.new_CONSTANT_info(CONSTANT_info.java:103)
at com.vladium.jcd.parser.ClassDefParser$classParser.constant_pool(ClassDefParser.java:168)
at com.vladium.jcd.parser.ClassDefParser$classParser.class_table(ClassDefParser.java:109)
at com.vladium.jcd.parser.ClassDefParser.parseClass(ClassDefParser.java:56)
at com.vladium.emma.instr.InstrProcessorST.handleFile(InstrProcessorST.java:468)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:193)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumeratePathDir(IPathEnumerator.java:177)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumerate(IPathEnumerator.java:97)
at com.vladium.emma.instr.InstrProcessorST._run(InstrProcessorST.java:715)
at com.vladium.emma.Processor.run(Processor.java:88)
at org.codehaus.mojo.emma.task.InstrumentTask.execute(InstrumentTask.java:106)
at org.codehaus.mojo.emma.EmmaInstrumentMojo.doExecute(EmmaInstrumentMojo.java:158)
at org.codehaus.mojo.emma.AbstractEmmaMojo.execute(AbstractEmmaMojo.java:98)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
... 24 more
[ERROR]
And this is the way i have added plugin to maven.I just only generate code coverage report to my test cases.Is there any one got this error ??
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<inherited>true</inherited>
</plugin>
</plugins>
</reporting>
You should not use the emma plugin, as it integrates Emma, which hasn't been updated in nearly a decade. Even though it wasn't updated, it continued to work for years.
Eventually, it was succeeded by EclEmma, which eventually re-based itself on JaCoCo (Java Code Coverage).
So now, you want the jacoco plugin, which has been updated to keep pace with Java Generics, and with the new functional interfaces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With