[
https://issues.apache.org/jira/browse/HIVE-26818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17813143#comment-17813143
]
Stamatis Zampetakis commented on HIVE-26818:
--------------------------------------------
The problem is still present in current master (commit
[6ab9b14c2c45e139a30ab78d41cefe5f1ab64d22|https://github.com/apache/hive/commit/6ab9b14c2c45e139a30ab78d41cefe5f1ab64d22]).
While running mvn install the issue is clearly visible in the console output.
{noformat}
[INFO] Replacing
/home/stamatis/Projects/Apache/hive/beeline/target/jar-with-dependencies.jar
with
/home/stamatis/Projects/Apache/hive/beeline/target/hive-beeline-4.0.0-beta-2-SNAPSHOT-shaded.jar
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ hive-beeline
---
[INFO] Installing
/home/stamatis/Projects/Apache/hive/beeline/target/hive-beeline-4.0.0-beta-2-SNAPSHOT.jar
to
/home/stamatis/.m2/repository/org/apache/hive/hive-beeline/4.0.0-beta-2-SNAPSHOT/hive-beeline-4.0.0-beta-2-SNAPSHOT.jar
[INFO] Installing
/home/stamatis/Projects/Apache/hive/beeline/dependency-reduced-pom.xml to
/home/stamatis/.m2/repository/org/apache/hive/hive-beeline/4.0.0-beta-2-SNAPSHOT/hive-beeline-4.0.0-beta-2-SNAPSHOT.pom
[INFO] Installing
/home/stamatis/Projects/Apache/hive/beeline/target/hive-beeline-4.0.0-beta-2-SNAPSHOT-tests.jar
to
/home/stamatis/.m2/repository/org/apache/hive/hive-beeline/4.0.0-beta-2-SNAPSHOT/hive-beeline-4.0.0-beta-2-SNAPSHOT-tests.jar
{noformat}
The so called "jar-with-dependencies.jar" is the fat shaded jar that includes
every direct and transitive dependency of the module. However, the one that is
installed in the maven repository is the regular
hive-beeline-4.0.0-beta-2-SNAPSHOT.jar without any extra dependencies. The
problem comes from the fact that the pom file that is installed in the maven
repository is dependency-reduced-pom.xml which describes the shaded jar and not
the regular jar.
There are two alternative ways to solve the problem:
# Publish in maven repo the fat shaded jar instead of the normal along with the
dependency-reduced-pom.xml file
# Publish in maven repo the regular jar with the normal pom.xml file
Since the shaded jar was created mainly for distributing a standalone beeline
application and not for replacing the standard jar the most appropriate
solution at this stage is to avoid generating the dependency-reduced-pom.xml
file and publishing the regular pom.xml instead.
> Beeline module misses transitive dependencies due to shading
> ------------------------------------------------------------
>
> Key: HIVE-26818
> URL: https://issues.apache.org/jira/browse/HIVE-26818
> Project: Hive
> Issue Type: Bug
> Components: Beeline
> Reporter: Stamatis Zampetakis
> Priority: Major
>
> Due to shading, the dependecy-reduced-pom.xml file is installed in the local
> maven repository
> (~/.m2/repository/org/apache/hive/hive-beeline/4.0.0-SNAPSHOT/) for beeline.
> The latter indicates that the module doesn't have any transitive
> dependencies. If we were publishing the shaded jar that would be true but we
> publish the regular jar.
> At this point, modules which include hive-beeline as a maven dependency are
> broken and problems such as HIVE-26812 may occur.
> I was under the impression that these also affects 4.0.0-alpha-2 release
> (since it includes ) HIVE-25750) but strangely the published pom has all the
> dependencies:
> https://repo1.maven.org/maven2/org/apache/hive/hive-beeline/4.0.0-alpha-2/hive-beeline-4.0.0-alpha-2.pom
--
This message was sent by Atlassian Jira
(v8.20.10#820010)