Skip to content
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

[DUMMY] [DO NOT MERGE] Create slim jars for hive-exec #364

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions hive-exec-shaded/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- 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>io.confluent</groupId>
<artifactId>kafka-connect-storage-common-parent</artifactId>
<version>11.3.0-SNAPSHOT</version>
</parent>

<artifactId>kafka-connect-storage-common-hive-exec-shaded</artifactId>
<packaging>jar</packaging>
<name>kafka-connect-storage-common-hive-exec-shaded</name>

<description>hive-exec reshaded to fix CVEs and remove vulnerable dependencies</description>
<inceptionYear>2020</inceptionYear>

<properties>
<hive.exec.version>4.0.0</hive.exec.version>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>org.apache.hive:hive-exec</include>
<include>com.google.protobuf:protobuf-java</include>
<include>org.apache.calcite.avatica:avatica</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>org.apache.hive:hive-exec</artifact>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>META-INF/maven/com.google.guava/**</exclude>
<exclude>com/google/protobuf/**</exclude>
<exclude>google/protobuf/**</exclude>
<exclude>META-INF/maven/org.apache.calcite.avatica/**</exclude>
<exclude>org/apache/calcite/avatica/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.calcite.avatica:avatica</artifact>
<includes>
<include>**</include>
</includes>
<excludes>
<!-- Exclude Avatica bundled SLF4J, because Hive manages its own SLF4J version. -->
<exclude>org/slf4j/**</exclude>
<exclude>META-INF/**</exclude>
<exclude>google/protobuf/**</exclude>
</excludes>
</filter>
<filter>
<artifact>com.google.protobuf:protobuf-java</artifact>
<includes>
<include>**</include>
</includes>
<excludes>
<!-- Exclude Avatica bundled SLF4J, because Hive manages its own SLF4J version. -->
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>io.confluent:*</artifact>
<excludes>
<exlude>**</exlude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${hive.exec.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
<artifactId>avatica</artifactId>
<version>1.13.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.calcite.avatica</groupId>
<artifactId>avatica-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
92 changes: 92 additions & 0 deletions hive-exec-slim/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- 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>io.confluent</groupId>
<artifactId>kafka-connect-storage-common-parent</artifactId>
<version>11.3.0-SNAPSHOT</version>
</parent>

<artifactId>kafka-connect-storage-common-hive-exec-slim</artifactId>
<packaging>jar</packaging>
<name>kafka-connect-storage-common-hive-exec-slim</name>

<description>hive-exec fat jar pruned to remove vulnerable dependencies</description>
<inceptionYear>2020</inceptionYear>

<properties>
<hive.exec.version>4.0.0</hive.exec.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${hive.exec.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>org.apache.hive:hive-exec</include>
</includes>
</artifactSet>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
</transformer>
</transformers>
<filters>
<filter>
<artifact>org.apache.hive:hive-exec</artifact>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>META-INF/maven/com.google.guava/**</exclude>
<exclude>com/google/protobuf/**</exclude>
<exclude>google/protobuf/**</exclude>
<exclude>META-INF/maven/org.apache.calcite.avatica/**</exclude>
<exclude>org/apache/calcite/avatica/**</exclude>
</excludes>
</filter>
<filter>
<artifact>io.confluent:*</artifact>
<excludes>
<exlude>**</exlude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
<module>hadoop-shaded-guava</module>
<module>hadoop-shaded-protobuf</module>
<module>package-kafka-connect-storage-common</module>
<module>hive-exec-shaded</module>
<module>hive-exec-slim</module>
</modules>

<properties>
Expand Down