### Why are the changes needed? Kyuubi uses log4j2 as the logging framework, while I found that the Hive SQL engine module still polls log4j 1.2 to the classpath unexpectedly, we should exclude it to avoid potential issues. ``` build/mvn dependency:tree -pl :kyuubi-hive-sql-engine_2.12 ``` ``` ... [INFO] +- org.apache.hive:hive-service:jar:3.1.3:provided [INFO] | +- org.apache.hive:hive-exec:jar:3.1.3:provided [INFO] | | +- org.apache.zookeeper:zookeeper:jar:3.4.6:provided [INFO] | | | +- log4j:log4j:jar:1.2.16:provided ... ``` ### How was this patch tested? Checks `build/mvn dependency:tree | grep 'log4j:log4j:jar:1.2'` returns nothing and pass GHA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #6859 from pan3793/exclude-log4j1. Closes #6859 287cf78af [Cheng Pan] Exclude log4j12 from hive engine module classpath Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
245 lines
9.8 KiB
XML
245 lines
9.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
|
~ contributor license agreements. See the NOTICE file distributed with
|
|
~ this work for additional information regarding copyright ownership.
|
|
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
|
~ (the "License"); you may not use this file except in compliance with
|
|
~ the License. You may obtain a copy of the License at
|
|
~
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
~
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
~ See the License for the specific language governing permissions and
|
|
~ limitations under the License.
|
|
-->
|
|
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>org.apache.kyuubi</groupId>
|
|
<artifactId>kyuubi-parent</artifactId>
|
|
<version>1.11.0-SNAPSHOT</version>
|
|
<relativePath>../../pom.xml</relativePath>
|
|
</parent>
|
|
|
|
<artifactId>kyuubi-hive-sql-engine_${scala.binary.version}</artifactId>
|
|
<packaging>jar</packaging>
|
|
<name>Kyuubi Project Engine Hive SQL</name>
|
|
<url>https://kyuubi.apache.org/</url>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.kyuubi</groupId>
|
|
<artifactId>kyuubi-common_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.kyuubi</groupId>
|
|
<artifactId>kyuubi-events_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.kyuubi</groupId>
|
|
<artifactId>kyuubi-ha_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.google.code.findbugs</groupId>
|
|
<artifactId>jsr305</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>commons-collections</groupId>
|
|
<artifactId>commons-collections</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>failureaccess</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-service</artifactId>
|
|
<version>${hive.version}</version>
|
|
<scope>provided</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.pentaho</groupId>
|
|
<artifactId>pentaho-aggdesigner-algorithm</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-llap-server</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-llap-tez</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-shims</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
<artifactId>hadoop-yarn-registry</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>log4j</groupId>
|
|
<artifactId>log4j</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-metastore</artifactId>
|
|
<version>${hive.version}</version>
|
|
<scope>provided</scope>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-serde</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-shims</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hbase</groupId>
|
|
<artifactId>hbase-client</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
<artifactId>hadoop-common</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
<artifactId>hadoop-hdfs</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.kyuubi</groupId>
|
|
<artifactId>kyuubi-util-scala_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
<type>test-jar</type>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.kyuubi</groupId>
|
|
<artifactId>kyuubi-common_${scala.binary.version}</artifactId>
|
|
<version>${project.version}</version>
|
|
<type>test-jar</type>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.kyuubi</groupId>
|
|
<artifactId>${hive.jdbc.artifact}</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.zaxxer</groupId>
|
|
<artifactId>HikariCP</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.vladsch.flexmark</groupId>
|
|
<artifactId>flexmark-all</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<configuration>
|
|
<shadedArtifactAttached>false</shadedArtifactAttached>
|
|
<artifactSet>
|
|
<includes>
|
|
<include>org.scala-lang:scala-library</include>
|
|
<include>com.fasterxml.jackson.core:jackson-annotations</include>
|
|
<include>com.fasterxml.jackson.core:jackson-core</include>
|
|
<include>com.fasterxml.jackson.core:jackson-databind</include>
|
|
<include>com.fasterxml.jackson.module:jackson-module-scala_${scala.binary.version}</include>
|
|
<include>org.apache.kyuubi:*</include>
|
|
</includes>
|
|
</artifactSet>
|
|
<filters>
|
|
<filter>
|
|
<artifact>*:*</artifact>
|
|
<excludes>
|
|
<exclude>META-INF/*.SF</exclude>
|
|
<exclude>META-INF/*.DSA</exclude>
|
|
<exclude>META-INF/*.RSA</exclude>
|
|
<exclude>META-INF/DEPENDENCIES</exclude>
|
|
<exclude>META-INF/LICENSE.txt</exclude>
|
|
<exclude>META-INF/NOTICE.txt</exclude>
|
|
<exclude>META-INF/maven/**</exclude>
|
|
<exclude>LICENSE.txt</exclude>
|
|
<exclude>NOTICE.txt</exclude>
|
|
<exclude>mozilla/**</exclude>
|
|
<exclude>**/module-info.class</exclude>
|
|
</excludes>
|
|
</filter>
|
|
</filters>
|
|
<relocations>
|
|
<relocation>
|
|
<pattern>com.fasterxml.jackson</pattern>
|
|
<shadedPattern>${kyuubi.shade.packageName}.com.fasterxml.jackson</shadedPattern>
|
|
<includes>
|
|
<include>com.fasterxml.jackson.**</include>
|
|
</includes>
|
|
</relocation>
|
|
</relocations>
|
|
<transformers>
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"></transformer>
|
|
</transformers>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
<phase>package</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>prepare-test-jar</id>
|
|
<goals>
|
|
<goal>test-jar</goal>
|
|
</goals>
|
|
<phase>test-compile</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
|
|
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
|
|
</build>
|
|
|
|
</project>
|