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 <bode...@apache.org> 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. > <artifactId>maven-bundle-plugin</artifactId> > <version>${commons.felix.version}</version> > </plugin> > + <plugin> > + <groupId>org.apache.maven.plugins</groupId> > + <artifactId>maven-surefire-plugin</artifactId> > + <version>${commons.surefire.version}</version> > + <dependencies> > + <dependency> > + <groupId>org.apache.commons</groupId> > + <artifactId>commons-lang3</artifactId> > + <version>3.7</version> > + </dependency> > + </dependencies> > + </plugin> > </plugins> > </pluginManagement> > <plugins> > > 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