GitHub user ppkarwasz added a comment to the discussion: [ERROR]   class file 
for org.apache.logging.log4j.Logger not found

Your `Log4jHelper` class leaks Log4j API types in the **public** API (for 
example in `getLogger(Logger log)`), therefore `log4j-api` is required during 
compilation. If you remove them from the public API, compilation should work.

Maven doesn't have a scope to describe a situation, when a transitive 
dependency is not needed at runtime, but only during compilation, but other 
build systems have it. For example Gradle has the [`compileOnlyApi` 
configuration](https://docs.gradle.org/current/userguide/java_library_plugin.html#declarable_bucket_configurations).

GitHub link: 
https://github.com/apache/logging-log4j2/discussions/4046#discussioncomment-16189111

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to