joseluisll opened a new pull request, #8940: URL: https://github.com/apache/hadoop/pull/8940
### Description of PR Part of HADOOP-19912 (Jetty 12 on ee8). `hadoop-yarn-server-timelineservice-hbase-tests` declared `javax.ws.rs:jsr311-api:1.1.1`, the JAX-RS 1.1 API that Jersey 1 used, added by YARN-5976 in 2016. The module also gets `jakarta.ws.rs:jakarta.ws.rs-api:2.1.6` (JAX-RS 2.1, which ships the `javax.ws.rs` packages) at test scope through `hadoop-yarn-server-timelineservice` and `jersey-server`. Both jars provided `javax.ws.rs`, so which class won depended on classpath order. This drops the 1.1 jar. The module has no `src/main`: it is a test jar. Its consumers are the `hadoop-yarn-project` aggregator (`provided` scope) and `hadoop-coverage` (a coverage-only module that is never published), neither of which compiles against its classes; it is not passed on to any module. The distribution copies only the module's own jar (`includeDependencies=false` in `hadoop-assemblies`). No user-visible classpath changes. The tests could not have been compiling against 1.1: `javax.ws.rs.client` (used by `TimelineEntitySetReader` and its siblings) does not exist before JAX-RS 2.0. So `jsr311-api` was redundant rather than shadowing 2.1 here, and removing it changes no behaviour. The removal is complete, not just the POM line: `git grep jsr311 -- '*pom.xml'` is empty at this commit, and hbase 2.6.3-hadoop3's own published POMs exclude `javax.ws.rs:jsr311-api` from the dependencies that used to bring it (`hbase-http`, `hbase-server`), so nothing brings it back transitively. ### How was this patch tested? - `mvn dependency:tree -Dincludes=javax.ws.rs` on trunk before the change shows `jsr311-api` only as this module's own direct dependency. After the change no dependency path provides it, and the JAX-RS 2.1 API resolves from `jakarta.ws.rs:jakarta.ws.rs-api:2.1.6`. - The module's unit tests: `hadoop-yarn-server-timelineservice-hbase-tests` in the patch passed (Yetus `unit` +1, JDK 17). - Yetus precommit on the branch: compile, javac, javadoc, mvnsite, shadedclient, mvninstall, blanks, asflicense and unit all +1 on JDK 17 and JDK 21. The only -1 is `test4tests`, which flags that no test file changed; this patch removes a dependency and adds none of the behaviour a unit test would cover. - A tree-wide scan of the fork (not part of this PR) checks every POM, including exclusions and `dependencyManagement`, and classifies every `.java` file's `javax.ws.rs` imports as 1.1-and-2.x or 2.x-only. The tree with this patch reports no `jsr311-api` declaration anywhere, and the module's tests import `javax.ws.rs.client`, which only JAX-RS 2.x provides. ### For code changes: - [x] Does the title of this PR start with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: Have the integration tests been executed and the endpoint declared according to the connector-specific documentation? (not applicable) - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? (no dependencies added; one removed) - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? (not applicable: `jsr311-api` is in none of them, and no jar leaves the distribution) ### AI Tooling If an AI tool was used: - [x] The PR includes the phrase "Contains content generated by <tool>" where <tool> is the name of the AI tool used. - [x] My use of AI contributions follows the ASF legal policy https://www.apache.org/legal/generative-tooling.html Contains content generated by Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
