This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch 2.x-java-17
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 3f550923261a9679c2ef72b6eed5dd43af79d7a7
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Thu Nov 30 14:35:54 2023 +0100

    Relax reflective access for Java 17 compatibility
---
 log4j-core-test/pom.xml | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml
index 0397af4b84..b7008d0ef1 100644
--- a/log4j-core-test/pom.xml
+++ b/log4j-core-test/pom.xml
@@ -360,15 +360,25 @@
 
   <build>
     <plugins>
+
+      <!-- Relax reflective access constraints for tests: 
https://junit-pioneer.org/docs/environment-variables/#warnings-for-reflective-access
 -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <argLine>
+            --add-opens java.base/java.lang=ALL-UNNAMED
+            --add-opens java.base/java.net=ALL-UNNAMED
+            --add-opens java.base/java.util=ALL-UNNAMED
+          </argLine>
+        </configuration>
+      </plugin>
+
+      <!-- Enable Log4j plugin processing -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <!--
-            ~ Modules that contain `log4j-core` plugins, must be compiled with:
-            ~
-            ~   
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
-            -->
           <annotationProcessorPaths combine.children="append">
             <path>
               <groupId>org.apache.logging.log4j</groupId>
@@ -378,6 +388,8 @@
           </annotationProcessorPaths>
         </configuration>
       </plugin>
+
     </plugins>
   </build>
+
 </project>

Reply via email to