Re: [all] Maven Build with Java 10/11?
On 2018-03-09, Stefan Bodewig wrote: > On 2018-03-09, Stephen Colebourne wrote: >> Just to note that surefire v2.21.0 is out now. No idea if that helps. >> Stephen > I'll update commons-parent. Somebody else already did. Stefan - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [all] Maven Build with Java 10/11?
On 2018-03-09, Stephen Colebourne wrote: > Just to note that surefire v2.21.0 is out now. No idea if that helps. > Stephen It does, many thanks. Strangely it also helps with Java11, so I guess the newer Surefire doesn't use SystemUtils.isJavaVersionAtLeast anymore. I'll update commons-parent. Stefan - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [all] Maven Build with Java 10/11?
Just to note that surefire v2.21.0 is out now. No idea if that helps. Stephen On 9 March 2018 at 08:22, Stefan Bodewig wrote: > Hi all > > I wanted to see whether anything was broken in COMPRESS with the Java10 > RC or the EA version of Java11 - unfortunately the build fails with > NullPointerException inside of Surefire. > > I run > > $ mvn clean test '-P!jacoco' > > as Jacoco doesn't seem to work for Java10+ either. I end up with > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on > project commons-compress: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: > NullPointerException -> [Help 1] > [ERROR] > > The stack trace I see with -X gets me to > > Caused by: java.lang.NullPointerException > at > org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1626) > > which I'm afraid has just been fixed a few days ago for Java11. > > IIUC this means it is impossible to run tests with Maven on Java11+ at > all until we (1) cut a new release of LANG and (2) get Surefire to use > that. > > For Java10 I'd probably need to force Surefire to use LANG in version > 3.7 (which according to the changelog fixes the NPE). I thought I'd add > an explicit dependency on lang 3.7 inside pluginManagement. Doing so I > see maven download LANG 3.7 but I still run into the same NPE. Obviously > Surefire does still use a different version of LANG as the line number > for the NPE is still the same, but this is a comment line inside the 3.7 > tag. > > Here is what I tried in COMPRESS' pom and still get the NPE with Java10: > > @@ -253,6 +253,18 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, > arj. >maven-bundle-plugin >${commons.felix.version} > > + > + org.apache.maven.plugins > + maven-surefire-plugin > + ${commons.surefire.version} > + > + > + org.apache.commons > + commons-lang3 > + 3.7 > + > + > + > > > > > Any ideas? > > Stefan > > - > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
[all] Maven Build with Java 10/11?
Hi all I wanted to see whether anything was broken in COMPRESS with the Java10 RC or the EA version of Java11 - unfortunately the build fails with NullPointerException inside of Surefire. I run $ mvn clean test '-P!jacoco' as Jacoco doesn't seem to work for Java10+ either. I end up with [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project commons-compress: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException -> [Help 1] [ERROR] The stack trace I see with -X gets me to Caused by: java.lang.NullPointerException at org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1626) which I'm afraid has just been fixed a few days ago for Java11. IIUC this means it is impossible to run tests with Maven on Java11+ at all until we (1) cut a new release of LANG and (2) get Surefire to use that. For Java10 I'd probably need to force Surefire to use LANG in version 3.7 (which according to the changelog fixes the NPE). I thought I'd add an explicit dependency on lang 3.7 inside pluginManagement. Doing so I see maven download LANG 3.7 but I still run into the same NPE. Obviously Surefire does still use a different version of LANG as the line number for the NPE is still the same, but this is a comment line inside the 3.7 tag. Here is what I tried in COMPRESS' pom and still get the NPE with Java10: @@ -253,6 +253,18 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. maven-bundle-plugin ${commons.felix.version} + + org.apache.maven.plugins + maven-surefire-plugin + ${commons.surefire.version} + + + org.apache.commons + commons-lang3 + 3.7 + + + Any ideas? Stefan - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org