[ 
https://issues.apache.org/jira/browse/HIVE-27338?focusedWorklogId=861753&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-861753
 ]

ASF GitHub Bot logged work on HIVE-27338:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/May/23 12:38
            Start Date: 12/May/23 12:38
    Worklog Time Spent: 10m 
      Work Description: zabetak opened a new pull request, #4317:
URL: https://github.com/apache/hive/pull/4317

   ### What changes were proposed in this pull request?
   1. Remove optional from `dependencyManagement` section since it has no 
effect (MNG-5227)
   2. Add explicitly the optional tag in every declaration of a JDBC driver.
   3. Add derby dependency in `hcatalog-core` module cause it is needed to 
compile `DerbyPolicy` class in tests; it was not necessary before cause the 
dependency was transitively inherited.
   4. Remove (now) redundant JDBC driver exclusions from packaging module 
(`bin.xml`).
   
   ### Why are the changes needed?
   1. Stop JDBC drivers propagation to other Hive modules and 3rd-party projects
   2. Ensure license compliance for those drivers that are in Category-X 
(https://www.apache.org/legal/resolved.html#optional)
   
   ### Does this PR introduce _any_ user-facing change?
   * The users will need to download the appropriate driver explicitly.
   * Dependent projects should add an explicit dependency if they need to use a 
specific DBMS.
   
   ### How was this patch tested?
   * Compared the results of `mvn dependency:tree` before and after the changes.
   * Verified that JDBC driver dependencies appear only in the expected places 
where they are declared.




Issue Time Tracking
-------------------

            Worklog Id:     (was: 861753)
    Remaining Estimate: 0h
            Time Spent: 10m

> JDBC drivers are transitively inherited although declared optional
> ------------------------------------------------------------------
>
>                 Key: HIVE-27338
>                 URL: https://issues.apache.org/jira/browse/HIVE-27338
>             Project: Hive
>          Issue Type: Bug
>          Components: Standalone Metastore
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The JDBC driver dependencies are declared optional (HIVE-25701) because we 
> don't really need them and it is up to the end-user to decide which DBMS they 
> will use and pick the appropriate driver for their use case. 
> Also declaring them as 
> [optional|https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html]
>  should stop their transitive propagation to 3rd-party projects that depend 
> on Hive modules.
> Currently the optional declaration is in the respective 
> {{dependencyManagement}} sections of the project:
> * 
> https://github.com/apache/hive/blob/dd8a867386b605ecd7e8dbec476556bf24f54c6f/pom.xml#L1323
> * 
> https://github.com/apache/hive/blob/dd8a867386b605ecd7e8dbec476556bf24f54c6f/standalone-metastore/pom.xml#L352
> However due to MNG-5227, the optional declaration in the 
> {{dependencyManagement}} has no effect so JDBC dependencies are transitively 
> propagated to every module that depends on some Hive module with a JDBC 
> driver dependency. 
> Till MNG-5227 is fixed we will need to include optional in every explicit 
> declaration of the dependency.



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

Reply via email to