mattcj / jacocotogo Goto Github PK
View Code? Open in Web Editor NEWA Maven Plugin for fetching JaCoCo data from remote servers.
Home Page: http://jacocotogo.helmetsrequired.org/
License: Apache License 2.0
A Maven Plugin for fetching JaCoCo data from remote servers.
Home Page: http://jacocotogo.helmetsrequired.org/
License: Apache License 2.0
Hi Folks,
Is it possible to clear the jacoco execution data before a regression test run using this plugin? I want start with a clean slate without having to restart the server. Is that possible?
Thanks for your help!
I've noticed that JacocoGo doesn't support newer version of jacocoAgent, Am I wrong?
If so, how difficult would be to implement this on getExecutionDataViaJaCoCoTCPServer and maybe set up a new property to be read on pom.xml to define which agent version the application is running.
0.7.6
Cannot read execution data version 0x1006. This version of JaCoCo uses execution data version 0x1007
0.7.5
java.io.IOException: Incompatible version 1006.
Had success on version 0.7.0
I am trying to instrument WARs inside WildFly 8.2.0 with JaCoCo via Arquillian for integration test coverage.
URL variant 1:
<serviceURL>service:jmx:http-remoting-jmx://localhost:9990</serviceURL>
Error variant 1:
[INFO] --- jacocotogo-maven-plugin:1.1:jmx (get_integration_test_coverage) @ sdv.okv.cbom.dokumentgenerierung.wildfly ---
[DEBUG] Configuring mojo org.helmetsrequired:jacocotogo-maven-plugin:1.1:jmx from plugin realm ClassRealm[plugin>org.helmetsrequired:jacocotogo-maven-plugin:1.1, parent: sun.misc.Launcher$AppClassLoader@6d06d69c]
[DEBUG] Configuring mojo 'org.helmetsrequired:jacocotogo-maven-plugin:1.1:jmx' with basic configurator -->
[DEBUG] (s) failOnError = false
[DEBUG] (s) outputFile = target/jacoco-it-dump.exec
[DEBUG] (s) password = XXXXX
[DEBUG] (s) resetAfterFetch = true
[DEBUG] (s) serviceURL = service:jmx:http-remoting-jmx://localhost:9990
[DEBUG] (s) username = XXXXX
[DEBUG] -- end configuration --
[DEBUG] Constructing JMXServiceURL from String: 'service:jmx:http-remoting-jmx://localhost:9990'
[DEBUG] Constructing JMXConnector for JMXServiceURL: 'service:jmx:http-remoting-jmx://localhost:9990'
[WARNING] Exception while running plugin. failOnError = false. IOException while communicating with JMXServiceURL: 'service:jmx:http-remoting-jmx://localhost:9990'
URL variant 2:
<serviceURL>service:jmx:rmi:///jndi/rmi://localhost:9990</serviceURL>
Error variant 2:
[ERROR] Failed to execute goal org.helmetsrequired:jacocotogo-maven-plugin:1.1:jmx (get_integration_test_coverage) on project sdv.okv: A type incompatibility occured while executing org.helmetsrequired:jacocotogo-maven-plugin:1.1:jmx: com.sun.jndi.rmi.registry.RegistryContext cannot be cast to javax.management.remote.rmi.RMIServer
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.helmetsrequired:jacocotogo-maven-plugin:1.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/development/mvn-local-repository/org/helmetsrequired/jacocotogo-maven-plugin/1.1/jacocotogo-maven-plugin-1.1.jar
[ERROR] urls[1] = file:/C:/development/mvn-local-repository/org/slf4j/slf4j-jdk14/1.7.5/slf4j-jdk14-1.7.5.jar
[ERROR] urls[2] = file:/C:/development/mvn-local-repository/log4j/log4j/1.2.16/log4j-1.2.16.jar
[ERROR] urls[3] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-inject-bean/2.3.0/sisu-inject-bean-2.3.0.jar
[ERROR] urls[4] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
[ERROR] urls[5] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar
[ERROR] urls[6] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-tools-annotations/3.2/maven-plugin-tools-annotations-3.2.jar
[ERROR] urls[7] = file:/C:/development/mvn-local-repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[8] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[9] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.2/maven-plugin-tools-api-3.2.jar
[ERROR] urls[10] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.jar
[ERROR] urls[11] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar
[ERROR] urls[12] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[13] = file:/C:/development/mvn-local-repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[14] = file:/C:/development/mvn-local-repository/asm/asm/3.3.1/asm-3.3.1.jar
[ERROR] urls[15] = file:/C:/development/mvn-local-repository/asm/asm-commons/3.3.1/asm-commons-3.3.1.jar
[ERROR] urls[16] = file:/C:/development/mvn-local-repository/asm/asm-tree/3.3.1/asm-tree-3.3.1.jar
[ERROR] urls[17] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
[ERROR] urls[18] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
[ERROR] urls[19] = file:/C:/development/mvn-local-repository/com/thoughtworks/qdox/qdox/1.12.1/qdox-1.12.1.jar
[ERROR] urls[20] = file:/C:/development/mvn-local-repository/org/jacoco/org.jacoco.core/0.6.3.201306030806/org.jacoco.core-0.6.3.201306030806.jar
[ERROR] urls[21] = file:/C:/development/mvn-local-repository/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.helmetsrequired:jacocotogo-maven-plugin:1.1:jmx (get_integration_test_coverage) on project sdv.okv: A type incompatibility occured while executing org.helmetsrequired:jacocotogo-maven-plugin:1.1:jmx: com.sun.jndi.rmi.registry.RegistryContext cannot be cast to javax.management.remote.rmi.RMIServer
-----------------------------------------------------
realm = plugin>org.helmetsrequired:jacocotogo-maven-plugin:1.1
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/development/mvn-local-repository/org/helmetsrequired/jacocotogo-maven-plugin/1.1/jacocotogo-maven-plugin-1.1.jar
urls[1] = file:/C:/development/mvn-local-repository/org/slf4j/slf4j-jdk14/1.7.5/slf4j-jdk14-1.7.5.jar
urls[2] = file:/C:/development/mvn-local-repository/log4j/log4j/1.2.16/log4j-1.2.16.jar
urls[3] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-inject-bean/2.3.0/sisu-inject-bean-2.3.0.jar
urls[4] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
urls[5] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar
urls[6] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-tools-annotations/3.2/maven-plugin-tools-annotations-3.2.jar
urls[7] = file:/C:/development/mvn-local-repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
urls[8] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
urls[9] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.2/maven-plugin-tools-api-3.2.jar
urls[10] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.jar
urls[11] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar
urls[12] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[13] = file:/C:/development/mvn-local-repository/junit/junit/3.8.1/junit-3.8.1.jar
urls[14] = file:/C:/development/mvn-local-repository/asm/asm/3.3.1/asm-3.3.1.jar
urls[15] = file:/C:/development/mvn-local-repository/asm/asm-commons/3.3.1/asm-commons-3.3.1.jar
urls[16] = file:/C:/development/mvn-local-repository/asm/asm-tree/3.3.1/asm-tree-3.3.1.jar
urls[17] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
urls[18] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
urls[19] = file:/C:/development/mvn-local-repository/com/thoughtworks/qdox/qdox/1.12.1/qdox-1.12.1.jar
urls[20] = file:/C:/development/mvn-local-repository/org/jacoco/org.jacoco.core/0.6.3.201306030806/org.jacoco.core-0.6.3.201306030806.jar
urls[21] = file:/C:/development/mvn-local-repository/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
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.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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
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:497)
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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: org.apache.maven.plugin.PluginExecutionException: A type incompatibility occured while executing org.helmetsrequired:jacocotogo-maven-plugin:1.1:jmx: com.sun.jndi.rmi.registry.RegistryContext cannot be cast to javax.management.remote.rmi.RMIServer
-----------------------------------------------------
realm = plugin>org.helmetsrequired:jacocotogo-maven-plugin:1.1
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/development/mvn-local-repository/org/helmetsrequired/jacocotogo-maven-plugin/1.1/jacocotogo-maven-plugin-1.1.jar
urls[1] = file:/C:/development/mvn-local-repository/org/slf4j/slf4j-jdk14/1.7.5/slf4j-jdk14-1.7.5.jar
urls[2] = file:/C:/development/mvn-local-repository/log4j/log4j/1.2.16/log4j-1.2.16.jar
urls[3] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-inject-bean/2.3.0/sisu-inject-bean-2.3.0.jar
urls[4] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
urls[5] = file:/C:/development/mvn-local-repository/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar
urls[6] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-tools-annotations/3.2/maven-plugin-tools-annotations-3.2.jar
urls[7] = file:/C:/development/mvn-local-repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
urls[8] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
urls[9] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.2/maven-plugin-tools-api-3.2.jar
urls[10] = file:/C:/development/mvn-local-repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.jar
urls[11] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar
urls[12] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[13] = file:/C:/development/mvn-local-repository/junit/junit/3.8.1/junit-3.8.1.jar
urls[14] = file:/C:/development/mvn-local-repository/asm/asm/3.3.1/asm-3.3.1.jar
urls[15] = file:/C:/development/mvn-local-repository/asm/asm-commons/3.3.1/asm-commons-3.3.1.jar
urls[16] = file:/C:/development/mvn-local-repository/asm/asm-tree/3.3.1/asm-tree-3.3.1.jar
urls[17] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
urls[18] = file:/C:/development/mvn-local-repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
urls[19] = file:/C:/development/mvn-local-repository/com/thoughtworks/qdox/qdox/1.12.1/qdox-1.12.1.jar
urls[20] = file:/C:/development/mvn-local-repository/org/jacoco/org.jacoco.core/0.6.3.201306030806/org.jacoco.core-0.6.3.201306030806.jar
urls[21] = file:/C:/development/mvn-local-repository/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:196)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 26 more
Caused by: java.lang.ClassCastException: com.sun.jndi.rmi.registry.RegistryContext cannot be cast to javax.management.remote.rmi.RMIServer
at javax.management.remote.rmi.RMIConnector.narrowJRMPServer(RMIConnector.java:1968)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1963)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1924)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:287)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:249)
at org.helmetsrequired.jacocotogo.JaCoCoToGo.getExecutionDataViaJMX(JaCoCoToGo.java:205)
at org.helmetsrequired.jacocotogo.JaCoCoToGo.fetchJaCoCoDataOverJmx(JaCoCoToGo.java:82)
at org.helmetsrequired.jacocotogo.JaCoCoToGoJmxMojo.execute(JaCoCoToGoJmxMojo.java:81)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 27 more
I am a JMX newbie, so I cannot understand the error messages, sorry. Maybe you can. The JMX switch for the JaCoCo Maven Plugin is set, by the way.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.