[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Enrico Olivelli updated SUREFIRE-1265: -------------------------------------- Attachment: Java9Example.zip Attaching a a simple reproducer, Just use javax.ws.Holder in a JUnit Test case. I tried to update the "surefire-1265" package on the integrations tests of surefire, but surefire itself cannot be built on Java9 run this command on the root of "maven-surefire" {code} JAVA_HOME=~/jdk-9 mvn clean install -DskipTests {code} The results is: {code} [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message: Detected JDK Version: 9 is not in the allowed range [1.6.0,1.9.0). [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-java) on project surefire: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1] {code} this is my java version {code} java 9-ea Java(TM) SE Runtime Environment (build 9-ea+163) Java HotSpot(TM) 64-Bit Server VM (build 9-ea+163, mixed mode) {code} > reuseForks=false fails on jdk-9-ea builds > ----------------------------------------- > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.19.1 > Reporter: Michael Musgrove > Assignee: Tibor Digana > Labels: jigsaw > Fix For: 2.20.1 > > Attachments: j9test.tar, Java9Example.zip > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.15#6346)