[
https://issues.apache.org/jira/browse/HIVE-29189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18021845#comment-18021845
]
Thomas Rebele commented on HIVE-29189:
--------------------------------------
It seems that the excludes/includes do not affect how the Hive tests jar is
built. I've found MSHADE-374 which describes that problem as well.
Here's a small script to get the <include> lines:
{code:java}
# The maven-shade-plugin can take a long time to resolve the tests jars
# This script gets a list of <include> attributes to configure the
maven-shade-plugin.
JAR_FILE="$1"
if [ "$JAR_FILE" == "" ]; then
echo "usage: </path/to/a-hive-tests.jar>"
exit 1
fi
for POM_PROPERTIES_PATH in $(unzip -l "$JAR_FILE" | grep 'pom.properties' | awk
'{print $4}'); do
unzip -qq -c "$JAR_FILE" "$POM_PROPERTIES_PATH" |
grep -v -e "^$" -e "^#" |
sort |
tr '\n' ' ' |
sed 's#artifactId=\([^ ]*\) groupId=\([^ ]*\) version=\([^
]*\)#<include>\2:\1:*:jar:tests</include>#'
echo
done | sort {code}
> Avoid downloading tests jars for hive-druid-handler
> ---------------------------------------------------
>
> Key: HIVE-29189
> URL: https://issues.apache.org/jira/browse/HIVE-29189
> Project: Hive
> Issue Type: Wish
> Reporter: Thomas Rebele
> Priority: Major
>
> For my dev environment, packaging hive-druid-handler takes a long time
> (sometimes more than 15 minutes).
> Reason is that it tries to download many tests jars:
> {code:java}
> [WARNING] Could not get tests for
> com.fasterxml.jackson.module:jackson-module-guice:jar:2.16.1:runtime
> [WARNING] Could not get tests for
> io.opentelemetry:opentelemetry-exporter-otlp:jar:1.42.0:compile
> [WARNING] Could not get tests for
> org.apache.druid:druid-console:jar:0.17.1:runtime
> ...{code}
> There is a warning from the logs about duplicate files and just the following
> test jars are mentioned:
> {code:java}
> async-http-client-2.5.3-tests.jar
> commons-collections4-4.1-tests.jar
> commons-compress-1.26.0-tests.jar
> commons-configuration2-2.10.1-tests.jar
> commons-dbcp2-2.12.0-tests.jar
> commons-jexl3-3.3-tests.jar
> commons-lang3-3.12.0-tests.jar
> commons-math3-3.6.1-tests.jar
> commons-pool2-2.12.0-tests.jar
> commons-text-1.10.0-tests.jar
> druid-core-0.17.1-tests.jar
> druid-hll-0.17.1-tests.jar
> druid-processing-0.17.1-tests.jar
> druid-server-0.17.1-tests.jar
> hive-druid-handler-4.2.0-SNAPSHOT-tests.jar
> jdbi-2.63.1-tests.jar{code}
> In HIVE-28140, the tests jars were [excluded
> completely|https://github.com/apache/hive/pull/5135/files] for the Kafka
> handler.
> Could we do the same with the hive-druid-handler and others? Or
> alternatively, only include those tests jars that are actually
> necessary/available?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)