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 dfa8558864cc83b30535638f2f3798d407b38296
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Thu Nov 30 16:07:38 2023 +0100

    Reflective access fixes
---
 log4j-1.2-api/pom.xml   | 18 +++++++++++++-----
 log4j-core-test/pom.xml |  8 +++-----
 log4j-jpa/pom.xml       | 18 +++++++++++++-----
 3 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml
index ba8091687c..e47c17ac0c 100644
--- a/log4j-1.2-api/pom.xml
+++ b/log4j-1.2-api/pom.xml
@@ -140,15 +140,21 @@
 
   <build>
     <plugins>
+
+      <!-- Relax reflective access constraints for tests -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <argLine>--add-opens java.base/java.io=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>
@@ -158,6 +164,8 @@
           </annotationProcessorPaths>
         </configuration>
       </plugin>
+
     </plugins>
   </build>
+
 </project>
diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml
index b7008d0ef1..e3329cb034 100644
--- a/log4j-core-test/pom.xml
+++ b/log4j-core-test/pom.xml
@@ -361,16 +361,14 @@
   <build>
     <plugins>
 
-      <!-- Relax reflective access constraints for tests: 
https://junit-pioneer.org/docs/environment-variables/#warnings-for-reflective-access
 -->
+      <!-- Relax reflective access constraints for tests -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <argLine>
-            --add-opens java.base/java.lang=ALL-UNNAMED
+          <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>
+            --add-opens java.base/java.util=ALL-UNNAMED</argLine>
         </configuration>
       </plugin>
 
diff --git a/log4j-jpa/pom.xml b/log4j-jpa/pom.xml
index 95f52cd080..38ec7de69a 100644
--- a/log4j-jpa/pom.xml
+++ b/log4j-jpa/pom.xml
@@ -100,15 +100,21 @@
 
   <build>
     <plugins>
+
+      <!-- Relax reflective access constraints for tests -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <argLine>--add-opens java.base/java.lang=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>
@@ -118,6 +124,8 @@
           </annotationProcessorPaths>
         </configuration>
       </plugin>
+
     </plugins>
   </build>
+
 </project>

Reply via email to