ppkarwasz commented on PR #860:
URL: https://github.com/apache/logging-log4j2/pull/860#issuecomment-1140247897

   This upgrade is tricky: some modules that use JPMS use a prehistoric version 
of Surefire (2.13).
   
   The reason behind is that newer versions of Surefire scan the test classpath 
without forking. Since the build process uses a Java 8 JRE and the test classes 
are compiled with Java 9, this fails miserably.
   
   On the other hand Surefire 2.13 runs the tests (which target Java 9+) on the 
classpath instead of the modulepath. This is not ideal either.
   
   There are two solutions we can apply:
   
   1. Compile the test classes with JDK 8 and `module-info.java` with JDK 9+. 
The newest Surefire does not scan `module-info.class`, so it does not fail and 
it executes the tests on the module path. I used this solution for 
`log4j-api-java9`,
   2. We can run Maven using Java9+ and use `toolchains.xml` to compile almost 
every module and run almost any test.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to