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

Stamatis Zampetakis commented on HIVE-29441:
--------------------------------------------

I am ok merging the changes if they are not redundant/noop. The proposed PR 
adds the following exclusion:

{code:xml}
<dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-testing-util</artifactId>
        <version>${hbase.version}</version>
        <classifier>tests</classifier>
        <exclusions>
          <exclusion>
            <groupId>org.glassfish.web</groupId>
            <artifactId>javax.servlet.jsp</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
{code}

However, the dependency tree as [reported by CI in latest 
master|https://github.com/apache/hive/actions/runs/21693377258/job/62558128052] 
does not contain "org.glassfish.web:javax.servlet.jsp" anywhere. I assume that 
adding an extra exclusion does not change anything to this respect.

I created a minimal pom.xml file outside of Hive with just hbase-testing-util 
dependency  and then run mvn dependency:tree

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<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";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.example</groupId>
    <artifactId>hbase-deps-test</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-testing-util</artifactId>
            <version>2.5.6-hadoop3</version>
            <classifier>tests</classifier>
        </dependency>
    </dependencies>
</project>
{code}

In this case the "org.glassfish.web:javax.servlet.jsp" appears in the tree. 

{noformat}
[INFO]    +- org.apache.hbase:hbase-server:jar:2.5.6-hadoop3:compile
[INFO]    |  +- org.apache.hbase:hbase-http:jar:2.5.6-hadoop3:compile
[INFO]    |  |  +- 
org.apache.hbase.thirdparty:hbase-shaded-jetty:jar:4.1.5:compile
[INFO]    |  |  +- 
org.apache.hbase.thirdparty:hbase-shaded-jersey:jar:4.1.5:compile
[INFO]    |  |  |  +- 
jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO]    |  |  |  +- 
jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO]    |  |  |  +- 
org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:compile
[INFO]    |  |  |  \- org.javassist:javassist:jar:3.29.2-GA:compile
[INFO]    |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.14.1:compile
[INFO]    |  |  \- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO]    |  +- org.apache.hbase:hbase-procedure:jar:2.5.6-hadoop3:compile
[INFO]    |  +- org.apache.hbase:hbase-replication:jar:2.5.6-hadoop3:compile
[INFO]    |  +- org.apache.hbase:hbase-metrics-api:jar:2.5.6-hadoop3:compile
[INFO]    |  +- org.apache.hbase:hbase-metrics:jar:2.5.6-hadoop3:compile
[INFO]    |  +- org.apache.hbase:hbase-asyncfs:jar:2.5.6-hadoop3:compile
[INFO]    |  +- org.glassfish.web:javax.servlet.jsp:jar:2.3.2:compile
[INFO]    |  |  \- org.glassfish:javax.el:jar:3.0.1-b12:compile (version 
selected from constraint [3.0.0,))
[INFO]    |  +- javax.servlet.jsp:javax.servlet.jsp-api:jar:2.3.1:compile
{noformat}

However it comes as a transitive dep of hbase-server and we already have the 
necessary exclusions at the [root pom.xml of 
Hive|https://github.com/apache/hive/blob/7b5433415e42ec92d29636109ea7f522c9354cf4/pom.xml#L1280].

{noformat}
<dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-server</artifactId>
        <version>${hbase.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.glassfish.web</groupId>
            <artifactId>javax.servlet.jsp</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
{noformat}

Based on this it seems that adding new exclusions for hbase-testing-util will 
not change anything on the current build. Please let me know if I am missing 
something.

> Avoid resolving dependency org.glassfish:javax.el by excluding 
> org.glassfish.web:javax.servlet.jsp from hbase-testing-util
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-29441
>                 URL: https://issues.apache.org/jira/browse/HIVE-29441
>             Project: Hive
>          Issue Type: Task
>            Reporter: Thomas Rebele
>            Assignee: Thomas Rebele
>            Priority: Major
>              Labels: pull-request-available
>
> The build fails on my machine:
> {code:java}
> $ mvn clean install -pl hbase-handler -DskipTests -Pitests 
> -Denforcer.skip=true
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] -----------------< org.apache.hive:hive-hbase-handler 
> >-----------------
> [INFO] Building Hive HBase Handler 4.3.0-SNAPSHOT
> [INFO]   from pom.xml
> [INFO] --------------------------------[ jar 
> ]---------------------------------
> Downloading from jvnet-nexus-snapshots: 
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b06-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b06-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b06-SNAPSHOT/maven-metadata.xml failed 
> to transfer from https://maven.java.net/content/repositories/snapshots during 
> a previous attempt. This failure was cached in the local repository and 
> resolution will not be reattempted until the update interval of 
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error: 
> Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b06-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> Downloading from jvnet-nexus-snapshots: 
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b06-SNAPSHOT/javax.el-3.0.1-b06-SNAPSHOT.pom
> Downloading from jvnet-nexus-snapshots: 
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b07-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b07-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b07-SNAPSHOT/maven-metadata.xml failed 
> to transfer from https://maven.java.net/content/repositories/snapshots during 
> a previous attempt. This failure was cached in the local repository and 
> resolution will not be reattempted until the update interval of 
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error: 
> Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b07-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> Downloading from jvnet-nexus-snapshots: 
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b07-SNAPSHOT/javax.el-3.0.1-b07-SNAPSHOT.pom
> Downloading from jvnet-nexus-snapshots: 
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b08-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b08-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b08-SNAPSHOT/maven-metadata.xml failed 
> to transfer from https://maven.java.net/content/repositories/snapshots during 
> a previous attempt. This failure was cached in the local repository and 
> resolution will not be reattempted until the update interval of 
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error: 
> Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b08-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> Downloading from jvnet-nexus-snapshots: 
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b08-SNAPSHOT/javax.el-3.0.1-b08-SNAPSHOT.pom
> Downloading from jvnet-nexus-snapshots: 
> https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b11-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b11-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [WARNING] org.glassfish:javax.el:3.0.1-b11-SNAPSHOT/maven-metadata.xml failed 
> to transfer from https://maven.java.net/content/repositories/snapshots during 
> a previous attempt. This failure was cached in the local repository and 
> resolution will not be reattempted until the update interval of 
> jvnet-nexus-snapshots has elapsed or updates are forced. Original error: 
> Could not transfer metadata 
> org.glassfish:javax.el:3.0.1-b11-SNAPSHOT/maven-metadata.xml from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  2.727 s
> [INFO] Finished at: 2026-02-04T15:09:20+01:00
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] 0 goals, 0 executed
> [ERROR] Failed to execute goal on project hive-hbase-handler: Could not 
> collect dependencies for project 
> org.apache.hive:hive-hbase-handler:jar:4.3.0-SNAPSHOT
> [ERROR] Failed to read artifact descriptor for 
> org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT
> [ERROR]       Caused by: The following artifacts could not be resolved: 
> org.glassfish:javax.el:pom:3.0.1-b06-SNAPSHOT (absent): Could not transfer 
> artifact org.glassfish:javax.el:pom:3.0.1-b06-SNAPSHOT from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [ERROR] Failed to read artifact descriptor for 
> org.glassfish:javax.el:jar:3.0.1-b07-SNAPSHOT
> [ERROR]       Caused by: The following artifacts could not be resolved: 
> org.glassfish:javax.el:pom:3.0.1-b07-SNAPSHOT (absent): Could not transfer 
> artifact org.glassfish:javax.el:pom:3.0.1-b07-SNAPSHOT from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [ERROR] Failed to read artifact descriptor for 
> org.glassfish:javax.el:jar:3.0.1-b08-SNAPSHOT
> [ERROR]       Caused by: The following artifacts could not be resolved: 
> org.glassfish:javax.el:pom:3.0.1-b08-SNAPSHOT (absent): Could not transfer 
> artifact org.glassfish:javax.el:pom:3.0.1-b08-SNAPSHOT from/to 
> jvnet-nexus-snapshots 
> (https://maven.java.net/content/repositories/snapshots): status code: 402, 
> reason phrase: Payment Required (402)
> [ERROR] 
> [ERROR] -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> {code}
> The dependency chain can be analyzed with {{{}mvn -X{}}}:
> {code:java}
> $ mvn -X clean install -pl hbase-handler -DskipTests -Pitests 
> -Denforcer.skip=true | grep "Failed to collect dependencies at"
> [ERROR] : Failed to collect dependencies at 
> org.apache.hbase:hbase-testing-util:jar:tests:2.5.6-hadoop3 -> 
> org.apache.hbase:hbase-server:jar:tests:2.5.6-hadoop3 -> 
> org.glassfish.web:javax.servlet.jsp:jar:2.3.2 -> 
> org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT
> Caused by: org.eclipse.aether.collection.DependencyCollectionException: 
> Failed to collect dependencies at 
> org.apache.hbase:hbase-testing-util:jar:tests:2.5.6-hadoop3 -> 
> org.apache.hbase:hbase-server:jar:tests:2.5.6-hadoop3 -> 
> org.glassfish.web:javax.servlet.jsp:jar:2.3.2 -> 
> org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT
> {code}



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

Reply via email to