-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubernetes-log4j doesn't generate Log4j2Plugins.dat #5847
Milestone
Comments
Ooops, that is embarassing. The annotation processor configuration seems correct, so I am not sure why the file does not end up in the final JAR file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</execution>
</executions>
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
...
</project> I'll look into it. |
ppkarwasz
added a commit
to ppkarwasz/kubernetes-client
that referenced
this issue
Mar 31, 2024
Due to a misconfiguration of the Maven Bundle Plugin, the Log4j Core plugin descriptor: ``` META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat ``` file is missing in the generated JAR. This PR fixes the Maven configuration and adds a simple integration test to prevent ensure that `PluginManager` is able to detect the Kubernetes Lookup.
11 tasks
manusa
pushed a commit
to ppkarwasz/kubernetes-client
that referenced
this issue
Apr 10, 2024
Due to a misconfiguration of the Maven Bundle Plugin, the Log4j Core plugin descriptor: ``` META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat ``` file is missing in the generated JAR. This PR fixes the Maven configuration and adds a simple integration test to prevent ensure that `PluginManager` is able to detect the Kubernetes Lookup.
manusa
pushed a commit
that referenced
this issue
Apr 10, 2024
Fix #5847: missing Log4j Core plugin descriptor Due to a misconfiguration of the Maven Bundle Plugin, the Log4j Core plugin descriptor: ``` META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat ``` file is missing in the generated JAR. This PR fixes the Maven configuration and adds a simple integration test to prevent ensure that `PluginManager` is able to detect the Kubernetes Lookup. --- Add changelog for #5848 --- Remove `public` modifier from JUnit 5 test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When switching from org.apache.logging.log4j:log4j-kubernetes to the new io.fabric8:kubernetes-log4j package following the discussion in #5682, I notice that the new
io.fabric8:kubernetes-log4j
package doesn't include theLog4j2Plugins.dat
file.As I understand this file is needed to make the plugin discoverable by Log4j2 and it is generated by the
PluginProcessor
annotation processor as in the documentation.However, kubernetes-log4j-6.11.0.pom doesn't specify the annotation processor, while this is specified in log4j-kubernetes-2.23.1.pom.
Fabric8 Kubernetes Client version
6.11.0
Steps to reproduce
org.apache.logging.log4j:log4j-kubernetes
jar file: log4j-kubernetes-2.23.1.jar.io.fabric8:kubernetes-log4j
jar file: kubernetes-log4j-6.11.0.jar.META-INF
fromlog4j-kubernetes-2.23.1.jar
, it includes theLog4j2Plugins.dat
file:META-INF
fromlog4j-kubernetes-2.23.1.jar
, it doesn't include theLog4j2Plugins.dat
file:Expected behavior
The
META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat
file should be included in thekubernetes-log4j
jar file.Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3@latest
Environment
Linux, macOS
Fabric8 Kubernetes Client Logs
No response
Additional context
Related issue: #5682
The text was updated successfully, but these errors were encountered: