Nagarjunanm commented on code in PR #20824:
URL: https://github.com/apache/druid/pull/20824#discussion_r4463710850


##########
services/pom.xml:
##########
@@ -164,6 +164,10 @@
             <groupId>com.sun.jersey</groupId>
             <artifactId>jersey-server</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-core</artifactId>
+        </dependency>

Review Comment:
   I did give it a try, and `test` breaks `druid-services-*-selfcontained.jar`. 
A direct declaration in `services` overrides the scope that `jersey-core` gets 
transitively through `jersey-server`, so with `test` it drops out of the 
module's runtime classpath and the shade plugin leaves it out of the jar (287 
classes → 0). The 404 `jersey-server` classes that depend on it stay, and 
loading `WebApplicationImpl` from the jar then fails with 
`NoClassDefFoundError: com/sun/jersey/spi/inject/Errors$Closure`. CI passes 
either way, so it's easy to miss.
   
   With the default scope, the resolved dependencies of `services` are 
identical to master, so nothing changes at runtime. If you'd rather not declare 
it at all. Can list it under `ignoredUsedUndeclaredDependencies` instead, like 
`jakarta.inject-api` already is in this pom.
   



-- 
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]

Reply via email to