GitHub user ppkarwasz added a comment to the discussion: 
java.lang.IllegalArgumentException: The `GraalVmProcessor` annotation processor 
is missing the required `log4j.graalvm.groupId` and `log4j.graalvm.artifactId` 
options

Thank you for your feedback!

You're absolutely right — we hadn’t fully considered the case of custom Log4j 
plugins used only in test code when implementing GraalVM metadata support in 
Log4j Core.

As a general principle, we encourage third-party Log4j Core plugins to follow 
the same standards as Log4j Core itself. This ensures consistent behavior 
across platforms and helps users discover and rely on high-quality extensions. 
In particular:

* We aim to list community plugins on our website (organized by type — e.g., 
Appenders, Layouts, Lookups), so they’re easier to find.
* We encourage support for the same platforms as Log4j Core: standard Java, 
JPMS, OSGi, GraalVM, and Android.

This is why we initially followed the [GraalVM reachability metadata 
documentation](https://www.graalvm.org/latest/reference-manual/native-image/metadata/)
 strictly, which recommends placing `reflect-config.json` files in 
`META-INF/native-image/<groupId>/<artifactId>` — and why we introduced the 
`-Alog4j.graalvm.groupId` and `-Alog4j.graalvm.artifactId` compiler options to 
set those values explicitly.

That said, your feedback (and others') made it clear that requiring these 
options can be a burden in some scenarios.

Tools like [picocli](https://picocli.info/#_processor_option_project) take a 
more flexible approach by making similar arguments optional, falling back to 
default values when not provided. Following this model, we will make the 
`-Alog4j.graalvm.groupId` and `-Alog4j.graalvm.artifactId` arguments optional 
starting in version `2.25.1`. Defaults will be inferred if these are not 
explicitly specified, similar to how picocli handles this.

For more details on the `2.25.1` release scope and timeline, see #3766.

Thanks again for raising this — improving the developer experience for plugin 
authors is a priority for us.


GitHub link: 
https://github.com/apache/logging-log4j2/discussions/3755#discussioncomment-13529642

----
This is an automatically sent email for dev@logging.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@logging.apache.org

Reply via email to