You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/05/28 12:03:44 UTC

[GitHub] [logging-log4j2] ppkarwasz commented on pull request #860: Bump surefire.plugin.version from 3.0.0-M5 to 3.0.0-M6

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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org