blob: 9d638667a67f7b9e2bfe3b65510b0efb9ca685f6 [file]
<?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">
<parent>
<artifactId>be-java-extensions</artifactId>
<groupId>org.apache.doris</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>hive-udf-shade</artifactId>
<packaging>jar</packaging>
<name>Doris BE Java Extensions - Hive UDF Contract Shade</name>
<description>
Minimal shaded jar carrying ONLY the Hive UDF contract classes
(org.apache.hadoop.hive.ql.exec.UDF plus its load-time closure) that a
user Hive UDF extends. Replaces the ~122MB shaded Hive catalog fat jar
that java-udf previously bundled just to provide this handful of classes.
</description>
<dependencies>
<!--
Source of the UDF contract classes. Marked optional so java-udf, which
depends on this shaded module, does NOT transitively re-pull the full
hive-exec:core jar: the ~handful of classes it needs are already baked
into hive-udf-shade.jar by the shade filter below. The wildcard
exclusion prunes hive-exec's heavy transitive tree (calcite/orc/...)
from resolution entirely, since we bundle nothing but hive-exec itself.
-->
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<classifier>core</classifier>
<version>${hive.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<finalName>hive-udf-shade</finalName>
<directory>${project.basedir}/target/</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<!-- Bundle only hive-exec; the project itself has no sources. -->
<artifactSet>
<includes>
<include>org.apache.hive:hive-exec</include>
</includes>
</artifactSet>
<!--
Keep ONLY the Hive UDF contract + its load-time closure:
- ql/exec/UDF* UDF base class, UDFMethodResolver,
UDFArgument*Exception, UDFClassLoader
- ql/exec/DefaultUDFMethodResolver instantiated by the UDF ctor
- ql/exec/Description the @Description annotation
- ql/metadata/HiveException* declared by some user UDFs
FunctionRegistry is referenced only inside the never-called
DefaultUDFMethodResolver.getEvalMethod(), so it is intentionally
excluded. Everything else in hive-exec is dropped.
-->
<filters>
<filter>
<artifact>org.apache.hive:hive-exec</artifact>
<includes>
<include>org/apache/hadoop/hive/ql/exec/UDF*.class</include>
<include>org/apache/hadoop/hive/ql/exec/DefaultUDFMethodResolver*.class</include>
<include>org/apache/hadoop/hive/ql/exec/Description*.class</include>
<include>org/apache/hadoop/hive/ql/metadata/HiveException*.class</include>
</includes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
</project>