This is an automated email from the ASF dual-hosted git repository.
wenjin272 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git
The following commit(s) were added to refs/heads/main by this push:
new bf31f521 [dist][runtime] Use Flink-provided Log4j dependencies (#954)
bf31f521 is described below
commit bf31f52124096915bf1aaf9271b840edee842a36
Author: Kerui Wang <[email protected]>
AuthorDate: Tue Aug 4 17:54:24 2026 +0800
[dist][runtime] Use Flink-provided Log4j dependencies (#954)
---
dist/common/pom.xml | 9 -----
dist/pom.xml | 41 ++++++++++++++++------
dist/src/main/resources/META-INF/NOTICE | 4 ---
.../pom.xml | 28 +++------------
e2e-test/pom.xml | 27 ++++++++++++++
plan/pom.xml | 10 ------
pom.xml | 2 +-
7 files changed, 63 insertions(+), 58 deletions(-)
diff --git a/dist/common/pom.xml b/dist/common/pom.xml
index 2d6b6dbc..ad00b691 100644
--- a/dist/common/pom.xml
+++ b/dist/common/pom.xml
@@ -79,15 +79,6 @@ under the License.
<shadeTestJar>false</shadeTestJar>
<shadedArtifactAttached>false</shadedArtifactAttached>
<filters>
- <!-- Exclude signature files -->
- <filter>
- <artifact>*:*</artifact>
- <excludes>
- <exclude>META-INF/*.SF</exclude>
- <exclude>META-INF/*.DSA</exclude>
- <exclude>META-INF/*.RSA</exclude>
- </excludes>
- </filter>
<!-- Exclude flink-agents own code from common
JAR -->
<filter>
<artifact>org.apache.flink:flink-agents-*</artifact>
diff --git a/dist/pom.xml b/dist/pom.xml
index 9ee655bb..09779d5b 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -135,6 +135,35 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
+ <configuration>
+ <artifactSet>
+ <excludes>
+ <exclude>org.apache.logging.log4j:*</exclude>
+ <exclude>org.slf4j:*</exclude>
+ </excludes>
+ </artifactSet>
+ <filters combine.children="append">
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.SF</exclude>
+ <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.RSA</exclude>
+ <!-- Also remove logging classes and
configuration embedded in shaded dependencies. -->
+ <exclude>org/apache/logging/log4j/**</exclude>
+ <exclude>org/slf4j/**</exclude>
+ <exclude>log4j2*.xml</exclude>
+ <exclude>log4j2*.properties</exclude>
+ <exclude>log4j2*.json</exclude>
+ <exclude>log4j2*.yaml</exclude>
+ <exclude>log4j2*.yml</exclude>
+
<exclude>META-INF/org/apache/logging/log4j/**</exclude>
+
<exclude>META-INF/services/org.apache.logging.log4j.*</exclude>
+
<exclude>META-INF/licenses/LICENSE.slf4j*</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
<executions>
<execution>
<id>shade-flink-agents</id>
@@ -145,16 +174,6 @@ under the License.
<configuration>
<shadeTestJar>false</shadeTestJar>
<shadedArtifactAttached>false</shadedArtifactAttached>
- <filters>
- <filter>
- <artifact>*:*</artifact>
- <excludes>
- <exclude>META-INF/*.SF</exclude>
- <exclude>META-INF/*.DSA</exclude>
- <exclude>META-INF/*.RSA</exclude>
- </excludes>
- </filter>
- </filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
@@ -168,4 +187,4 @@ under the License.
</plugin>
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/dist/src/main/resources/META-INF/NOTICE
b/dist/src/main/resources/META-INF/NOTICE
index afc811a1..0209a104 100644
--- a/dist/src/main/resources/META-INF/NOTICE
+++ b/dist/src/main/resources/META-INF/NOTICE
@@ -14,9 +14,6 @@ This project bundles the following dependencies under the
Apache Software Licens
- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2
- com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2
- com.fasterxml:classmate:1.7.0
-- org.apache.logging.log4j:log4j-api:2.23.1
-- org.apache.logging.log4j:log4j-core:2.23.1
-- org.apache.logging.log4j:log4j-slf4j-impl:2.23.1
- org.apache.kafka:kafka-clients:4.0.0
- org.lz4:lz4-java:1.8.0
- org.xerial.snappy:snappy-java:1.1.10.5
@@ -145,7 +142,6 @@ This project bundles the following dependencies under the
Apache Software Licens
This project bundles the following dependencies under the MIT license.
See bundled license files for details.
-- slf4j-api:slf4j-api:1.7.36
- io.github.ollama4j:ollama4j:1.1.5
- org.jsoup:jsoup:1.21.2
- com.anthropic:anthropic-java:2.11.1
diff --git a/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml
b/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml
index 479a47ba..18f792cb 100644
--- a/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml
+++ b/e2e-test/flink-agents-end-to-end-tests-integration/pom.xml
@@ -158,29 +158,8 @@ under the License.
<properties>
<flink.version>${flink.1.20.version}</flink.version>
<flink.agents.dist.artifactId>flink-agents-dist-flink-1.20</flink.agents.dist.artifactId>
+ <flink.log4j2.version>2.24.3</flink.log4j2.version>
</properties>
- <dependencies>
- <!-- Flink 1.20 does not transitively provide log4j-core in
test classpath,
- needed for Slf4jEventLogger which uses log4j2 core APIs
-->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
</profile>
<!-- Flink 2.0 Profile -->
@@ -189,6 +168,7 @@ under the License.
<properties>
<flink.version>${flink.2.0.version}</flink.version>
<flink.agents.dist.artifactId>flink-agents-dist-flink-2.0</flink.agents.dist.artifactId>
+ <flink.log4j2.version>2.24.3</flink.log4j2.version>
</properties>
</profile>
@@ -198,6 +178,7 @@ under the License.
<properties>
<flink.version>${flink.2.1.version}</flink.version>
<flink.agents.dist.artifactId>flink-agents-dist-flink-2.1</flink.agents.dist.artifactId>
+ <flink.log4j2.version>2.24.3</flink.log4j2.version>
</properties>
</profile>
@@ -207,8 +188,9 @@ under the License.
<properties>
<flink.version>${flink.2.2.version}</flink.version>
<flink.agents.dist.artifactId>flink-agents-dist-flink-2.2</flink.agents.dist.artifactId>
+ <flink.log4j2.version>2.24.3</flink.log4j2.version>
</properties>
</profile>
</profiles>
-</project>
+</project>
\ No newline at end of file
diff --git a/e2e-test/pom.xml b/e2e-test/pom.xml
index 4c9fb14d..fd387d0d 100644
--- a/e2e-test/pom.xml
+++ b/e2e-test/pom.xml
@@ -28,6 +28,33 @@ under the License.
<artifactId>flink-agents-e2e-tests</artifactId>
<packaging>pom</packaging>
<name>Flink Agents : E2E Tests: </name>
+
+ <properties>
+ <!-- The default E2E runtime is Flink 2.3. Profiles override this when
needed. -->
+ <flink.log4j2.version>2.25.3</flink.log4j2.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${flink.log4j2.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${flink.log4j2.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${flink.log4j2.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<modules>
<module>flink-agents-end-to-end-tests-agent-plan-compatibility</module>
<module>flink-agents-end-to-end-tests-integration</module>
diff --git a/plan/pom.xml b/plan/pom.xml
index 02df3c2c..133ce0b3 100644
--- a/plan/pom.xml
+++ b/plan/pom.xml
@@ -85,16 +85,6 @@ under the License.
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
</dependencies>
<profiles>
diff --git a/pom.xml b/pom.xml
index 108841ac..b7774db7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,7 @@ under the License.
<junit5.version>5.10.1</junit5.version>
<jackson.version>2.18.2</jackson.version>
<pemja.version>0.5.7</pemja.version>
- <log4j2.version>2.23.1</log4j2.version>
+ <log4j2.version>2.24.3</log4j2.version>
<slf4j.version>1.7.36</slf4j.version>
<assertj.version>3.27.7</assertj.version>
<mockito.version>5.14.2</mockito.version>