[
https://issues.apache.org/jira/browse/HADOOP-20000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jose Luis López updated HADOOP-20000:
-------------------------------------
Description:
Sub-task of HADOOP-19912; follows HADOOP-19970.
h3. Problem
{{hadoop-yarn-server-timelineservice-hbase-tests}} declares
{{javax.ws.rs:jsr311-api:1.1.1}}, the JAX-RS 1.1 API that Jersey 1 used. It was
added by YARN-5976 (2016) for HBase 1.2. The same module also gets
{{jakarta.ws.rs:jakarta.ws.rs-api:2.1.6}} (JAX-RS 2.1) through Jersey 2. Both
jars provide the {{javax.ws.rs}} package, so the module's classpath carries two
JAX-RS API versions, and which class wins depends on classpath order.
HADOOP-19970 removes this kind of duplicate for Jetty and the servlet API. This
does the same for JAX-RS.
h3. Evidence
{noformat}
$ mvn dependency:tree -am -pl
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests
-Dincludes=javax.ws.rs,jakarta.ws.rs
org.apache.hadoop:hadoop-yarn-server-timelineservice-hbase-tests:jar:3.6.0-SNAPSHOT
+- org.apache.hadoop:hadoop-yarn-server-timelineservice:jar:3.6.0-SNAPSHOT:test
| \- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:test
\- javax.ws.rs:jsr311-api:jar:1.1.1:compile
{noformat}
The JAX-RS 2.1 API wins today only because it comes first in the dependency
tree. The module's tests use JAX-RS 2 APIs, so {{jsr311-api}} appears unused.
This is the only POM in the repository that declares it, and no other
dependency of the module brings a JAX-RS 1.x API.
h3. Change
* Remove the {{jsr311-api}} dependency from the module's POM.
* Check with {{mvn dependency:tree}} that no other path brings {{jsr311-api}}
or another JAX-RS 1.x API onto the classpath. Exclude it there if one does.
h3. Done when
* {{javax.ws.rs:jsr311-api}} is on no module classpath of the trunk build.
* The module's tests pass.
> Remove the Jersey 1 leftover
> ----------------------------
>
> Key: HADOOP-20000
> URL: https://issues.apache.org/jira/browse/HADOOP-20000
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Jose Luis López
> Priority: Minor
>
> Sub-task of HADOOP-19912; follows HADOOP-19970.
> h3. Problem
> {{hadoop-yarn-server-timelineservice-hbase-tests}} declares
> {{javax.ws.rs:jsr311-api:1.1.1}}, the JAX-RS 1.1 API that Jersey 1 used. It
> was added by YARN-5976 (2016) for HBase 1.2. The same module also gets
> {{jakarta.ws.rs:jakarta.ws.rs-api:2.1.6}} (JAX-RS 2.1) through Jersey 2. Both
> jars provide the {{javax.ws.rs}} package, so the module's classpath carries
> two JAX-RS API versions, and which class wins depends on classpath order.
> HADOOP-19970 removes this kind of duplicate for Jetty and the servlet API.
> This does the same for JAX-RS.
> h3. Evidence
> {noformat}
> $ mvn dependency:tree -am -pl
> hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests
> -Dincludes=javax.ws.rs,jakarta.ws.rs
> org.apache.hadoop:hadoop-yarn-server-timelineservice-hbase-tests:jar:3.6.0-SNAPSHOT
> +-
> org.apache.hadoop:hadoop-yarn-server-timelineservice:jar:3.6.0-SNAPSHOT:test
> | \- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:test
> \- javax.ws.rs:jsr311-api:jar:1.1.1:compile
> {noformat}
> The JAX-RS 2.1 API wins today only because it comes first in the dependency
> tree. The module's tests use JAX-RS 2 APIs, so {{jsr311-api}} appears unused.
> This is the only POM in the repository that declares it, and no other
> dependency of the module brings a JAX-RS 1.x API.
> h3. Change
> * Remove the {{jsr311-api}} dependency from the module's POM.
> * Check with {{mvn dependency:tree}} that no other path brings {{jsr311-api}}
> or another JAX-RS 1.x API onto the classpath. Exclude it there if one does.
> h3. Done when
> * {{javax.ws.rs:jsr311-api}} is on no module classpath of the trunk build.
> * The module's tests pass.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]