So I checked out the code to build with Java 10 and the following modifications:
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 46536814..012f2513 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -134,8 +134,8 @@
<jacoco.home.url>http://www.jacoco.org/jacoco</jacoco.home.url>
<copyright.years>${project.inceptionYear}, 2018</copyright.years>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
And setting the JAVA_HOME to the JDK10 home (on macos)
The build fails on the JaCoCo Maven plugin 0.8.1-SNAPSHOT:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Exception in thread "main" java.lang.reflect.InvocationTargetException
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:510)
at
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:522)
Caused by: java.lang.RuntimeException: Class java/lang/UnknownError could not
be instrumented.
at
org.jacoco.agent.rt.internal_5ee6723.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:139)
at
org.jacoco.agent.rt.internal_5ee6723.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:100)
at
org.jacoco.agent.rt.internal_5ee6723.PreMain.createRuntime(PreMain.java:55)
at org.jacoco.agent.rt.internal_5ee6723.PreMain.premain(PreMain.java:47)
... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.base/java.lang.Class.getField(Class.java:1958)
at
org.jacoco.agent.rt.internal_5ee6723.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:137)
... 9 more
FATAL ERROR in native method: processing of -javaagent failed
/bin/sh: line 1: 9863 Abort trap: 6
/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java
-javaagent:/Users/aikeda/.m2/repository/org/jacoco/org.jacoco.agent/0.8.1-SNAPSHOT/org.jacoco.agent-0.8.1-SNAPSHOT-runtime.jar=destfile=/Users/aikeda/work/git_temp/jacoco/org.jacoco.examples.test/target/it/build/target/jacoco.exec
-jar
/Users/aikeda/work/git_temp/jacoco/org.jacoco.examples.test/target/it/build/target/surefire/surefirebooter1488992804996113280.jar
/Users/aikeda/work/git_temp/jacoco/org.jacoco.examples.test/target/it/build/target/surefire/surefire17308046656739157768tmp
/Users/aikeda/work/git_temp/jacoco/org.jacoco.examples.test/target/it/build/target/surefire/surefire_05037254967156807257tmp
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/1aaf2678-0f50-410b-ae5b-efc592cb7f8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.