Author: tilman
Date: Thu Jun 19 05:41:18 2025
New Revision: 1926572

URL: http://svn.apache.org/viewvc?rev=1926572&view=rev
Log:
PDFBOX-6021: add generation of plugin descriptor because of build problem with 
2.25.0, as suggested by Piotr P. Karwasz; closes #207

Modified:
    pdfbox/trunk/debugger/pom.xml

Modified: pdfbox/trunk/debugger/pom.xml
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/debugger/pom.xml?rev=1926572&r1=1926571&r2=1926572&view=diff
==============================================================================
--- pdfbox/trunk/debugger/pom.xml (original)
+++ pdfbox/trunk/debugger/pom.xml Thu Jun 19 05:41:18 2025
@@ -97,6 +97,48 @@
       </resource>
     </resources>
     <plugins>
+        <!-- 
https://logging.apache.org/log4j/2.x/manual/plugins.html#plugin-registry -->
+        <!-- needed since log4j 2.25.0 because of DebugLogAppender.java plugin 
-->
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <!-- Enable generation of Log4j Core plugin metadata -->
+            <executions>
+                <execution>
+                    <id>default-compile</id>
+                    <configuration>
+                        <!--
+                        ~ Enables annotation processing
+                        ~ This option is only recognized by recent JDK 
versions:
+                        ~ - 11.0.23 or later
+                        ~ - 17.0.11 or later
+                        -->
+                        <proc>full</proc>
+                        <annotationProcessorPaths>
+                            <path>
+                                <groupId>org.apache.logging.log4j</groupId>
+                                <artifactId>log4j-core</artifactId>
+                            </path>
+                        </annotationProcessorPaths>
+                        <annotationProcessors>
+                            <!-- Generate a `Log4j2Plugins.dat` descriptor -->
+                            <annotationProcessor>
+                                
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+                            </annotationProcessor>
+                            <!-- Generate GraalVM reachability metadata -->
+                            <annotationProcessor>
+                                
org.apache.logging.log4j.core.config.plugins.processor.GraalVmProcessor
+                            </annotationProcessor>
+                        </annotationProcessors>
+                        <compilerArgs>
+                            <!-- Required arguments for GraalVmProcessor -->
+                            
<arg>-Alog4j.graalvm.groupId=${project.groupId}</arg>
+                            
<arg>-Alog4j.graalvm.artifactId=${project.artifactId}</arg>
+                        </compilerArgs>
+                    </configuration>
+                </execution>
+            </executions>
+        </plugin>
         <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-jar-plugin</artifactId>


Reply via email to