Hi all,

Currently the `release-2.x` branch must be run using JDK 8 and uses
Maven's toolchains to compile Java 9+ code. This has many drawbacks:
 * It is difficult for new contributors to run the build process,
 * It requires a change to `JAVA_HOME` each time we build
`release-2.x`. I suppose most of you use a different default Java
version,
 * the latest Maven Surefire plugin fails to run if there are Java 9+
classes on the classpath: it performs a class scan in the current JVM
and forks only afterwards.

>From my own tests the `--release 8` switch on JDK 9+ works quite well
(i.e. the signatures of the JRE methods are those from JRE 8, not JRE
9+, the classes use the correct bytecode version and it produces
errors if we use Java 9+ language features). Maybe we could switch to
compiling `release-2.x` using Java 11 with the `--release 8` after
2.18.0 is out? I would keep the toolchains configuration exclusively
for the Maven Surefire plugin: it would scan the test classes using
the current JVM and fork an authentic JVM 8 to run the tests. What do
you think?

Piotr

Reply via email to