Replies: 4 comments 16 replies
-
I have the same issue. |
Beta Was this translation helpful? Give feedback.
-
Hi @ratoaq2, Thanks for the detailed error log — it's very helpful. From what you've shared, the issue is occurring during the
If you want to use a separate execution for annotation processing, you need to disable annotation processing in <execution>
<id>default-compile</id>
<configuration>
<proc>none</proc>
</configuration>
</execution> If, on the other hand, you want to perform both compilation and annotation processing (Log4j plugin descriptor + GraalVM metadata) in a single Maven execution, you can fully configure the <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.15.0</version>
</dependency>
</dependencies>
<configuration>
<!-- Use Eclipse Compiler explicitly -->
<compilerId>eclipse</compilerId>
<release>21</release>
<!-- Default to no annotation processing unless explicitly enabled -->
<proc>none</proc>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.25.0</version>
</path>
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
</annotationProcessor>
<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> I hope that helps solving your problem. |
Beta Was this translation helpful? Give feedback.
-
It seems I got it working with proc none plus empty annotation processors: <annotationProcessorPaths>
<path>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</path>
</annotationProcessorPaths>
<annotationProcessors>
<!-- empty -->
</annotationProcessors> |
Beta Was this translation helpful? Give feedback.
-
Tried to making work with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have a java 21 maven project which uses eclipse compiler org.codehaus.plexus:plexus-compiler-eclipse:2.15.0 and has a log4j plugin using a Log4j2Plugins.dat file and configured the compiler with:
After upgrading from 2.24.3 to 2.25.0 now my compilation is failing with:
Is anyone facing similar issue? I tried to specify the graal processor with its arguments, but that doesn't work either.
Beta Was this translation helpful? Give feedback.
All reactions