[ 
https://issues.apache.org/jira/browse/HIVE-28455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875410#comment-17875410
 ] 

Kokila N commented on HIVE-28455:
---------------------------------

hive-jdbc -> slim jar. If the pom file built only the slim jar, then there will 
be no dependencies removed.

hive-jdbc-standalone -> shaded jar. For shaded jar, as the dependencies will be 
shaded inside the jar, we remove them from the pom file creating a 
dependency-reduced-pom file and installing that in the maven repo. 

Now, since we create both slim and shaded jar using the same pom, shaded takes 
precedence and most of the dependencies are removed. This is good for shaded 
jar. But for slim , jar we won't bring in any of the transitive dependencies.
{code:java}
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< org.example:genericinfo >-----------------------
[INFO] Building genericinfo 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ genericinfo ---
[INFO] org.example:genericinfo:jar:1.0-SNAPSHOT
[INFO] \- org.apache.hive:hive-jdbc:jar:4.0.0-beta-1:compile
[INFO]    \- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.652 s
[INFO] Finished at: 2024-08-21T14:18:57+05:30
[INFO] ------------------------------------------------------------------------
 {code}
Is it that we won't be supporting the slim jar with any transitive dependencies 
?

> Missing dependencies due to upgrade of maven-shade-plugin
> ---------------------------------------------------------
>
>                 Key: HIVE-28455
>                 URL: https://issues.apache.org/jira/browse/HIVE-28455
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 4.0.0, 4.0.0-beta-1, 4.1.0
>            Reporter: Kokila N
>            Assignee: Kokila N
>            Priority: Major
>              Labels: hive-4.0.1-must
>
> For, hive jdbc , we create two jars {{hive-jdbc}} and 
> {{hive-jdbc-standalone}} (shaded jar/uber jar).
> *Reason for change in pom :*
> Due to the changes in the maven code after version 3.2.4, when we create a 
> shaded jar ( {{{}hive-jdbc-standalone{}}}),  {{dependency-reduced-pom.xml}}  
> is generated and dependencies that have been included into the uber JAR will 
> be removed from the {{<dependencies>}} section of the generated POM to avoid 
> duplication. This {{dependency-reduced-pom.xml}} is why the dependencies are 
> removed from the pom as its common for both {{hive-jdbc}} and 
> {{{}hive-jdbc-standalone{}}}. So, currently for hive-jdbc , the transitive 
> dependencies for it are not propagated.
> Same applies to hive-beeline and hive-exec modules as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to