You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "almeidajeff (via GitHub)" <gi...@apache.org> on 2026/04/24 14:09:17 UTC
[PR] AMBARI-26569: Exclude legacy transitive dependencies causing runtime … [ambari]
almeidajeff opened a new pull request, #4125:
URL: https://github.com/apache/ambari/pull/4125
…conflicts in server assembly
## What changes were proposed in this pull request?
This PR adds `<excludes>` to the ambari-server assembly descriptor (`ambari-server/src/main/assemblies/server.xml`) to prevent legacy JARs from being packaged. Specifically, it excludes:
- `net.sf.ehcache:ehcache` (ehcache 2.x) - conflicts with ehcache 3.x used by Ambari
- Jersey 1.x JARs (`jersey-core`, `jersey-server`, `jersey-json`, `jersey-servlet`, `jersey-client`) - conflicts with Jersey 2.x
- `javax.ws.rs:jsr311-api` (JAX-RS 1.x) - conflicts with JAX-RS 2.x
These JARs are brought transitively by dependencies such as Hadoop and swagger-jaxrs. The exclusions eliminate the need for manual post-installation cleanup (e.g., removing `ehcache-2.10.4.jar` from the Dockerfile) and prevent runtime `ClassNotFoundException` and `NoSuchMethodError` issues caused by classpath conflicts.
## How was this patch tested?
- Built ambari-server with `mvn -pl ambari-server -am -DskipTests package`
- Verified that the excluded JARs are not present in the assembly output
- Confirmed ambari-server starts correctly without the legacy JARs
- Verified Ambari UI loads and API calls work normally
- No `ClassNotFoundException` or `NoSuchMethodError` related to ehcache/Jersey/JAX-RS observed in logs
Please review [Ambari Contributing Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) before opening a pull request.
--
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: dev-unsubscribe@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26569: Exclude legacy transitive dependencies causing runtime … [ambari]
Posted by "sandeepk318 (via GitHub)" <gi...@apache.org>.
sandeepk318 commented on PR #4125:
URL: https://github.com/apache/ambari/pull/4125#issuecomment-4368801059
@almeidajeff changes looks good now. Can you check the CI and make it pass?
--
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: dev-unsubscribe@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26569: Exclude legacy transitive dependencies causing runtime … [ambari]
Posted by "almeidajeff (via GitHub)" <gi...@apache.org>.
almeidajeff commented on PR #4125:
URL: https://github.com/apache/ambari/pull/4125#issuecomment-4370668738
I checked the CI and it is passing.
All tests ran successfully (no failures or errors), and the build completed with BUILD SUCCESS.
----------------------------------------------------------------------
Ran 296 tests in 11.321s
OK
----------------------------------------------------------------------
Total run:352
Total errors:0
Total failures:0
OK
Creating zip file...
<MagicMock name='mock.__radd__().__add__()' id='139706963567200'>
Creating zip file...
<MagicMock name='mock.__radd__().__add__()' id='139706963380064'>
<MagicMock name='mock.__radd__().__add__()' id='139706963380064'>
[INFO]
[INFO] --- checkstyle:2.17:check (checkstyle) @ ambari-server ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Ambari Main 3.1.0.0-SNAPSHOT:
[INFO]
[INFO] Ambari Main ........................................ SUCCESS [ 2.618 s]
[INFO] Apache Ambari Project POM .......................... SUCCESS [ 0.086 s]
[INFO] Ambari Views ....................................... SUCCESS [ 3.258 s]
[INFO] Ambari Admin View .................................. SUCCESS [02:04 min]
[INFO] ambari-utility ..................................... SUCCESS [ 2.758 s]
[INFO] Ambari Server SPI .................................. SUCCESS [ 0.655 s]
[INFO] Ambari Service Advisor ............................. SUCCESS [ 1.034 s]
[INFO] Ambari Server ...................................... SUCCESS [01:19 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:35 min
[INFO] Finished at: 2026-04-27T20:38:21Z
[INFO] ------------------------------------------------------------------------
> @almeidajeff changes looks good now. Can you check the CI and make it pass?
--
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: dev-unsubscribe@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26569: Exclude legacy transitive dependencies causing runtime … [ambari]
Posted by "almeidajeff (via GitHub)" <gi...@apache.org>.
almeidajeff commented on code in PR #4125:
URL: https://github.com/apache/ambari/pull/4125#discussion_r3150018732
##########
ambari-server/src/main/assemblies/server.xml:
##########
@@ -464,6 +464,19 @@
<outputDirectory>/usr/lib/ambari-server</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
+ <!--
Review Comment:
Thank you for the feedback @sandeepk318 I've updated the approach to exclude the legacy JARs from individual dependencies rather than the assembly descriptor, keeping the assembly clean.
--
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: dev-unsubscribe@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26569: Exclude legacy transitive dependencies causing runtime … [ambari]
Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC merged PR #4125:
URL: https://github.com/apache/ambari/pull/4125
--
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: dev-unsubscribe@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org
Re: [PR] AMBARI-26569: Exclude legacy transitive dependencies causing runtime … [ambari]
Posted by "sandeepk318 (via GitHub)" <gi...@apache.org>.
sandeepk318 commented on code in PR #4125:
URL: https://github.com/apache/ambari/pull/4125#discussion_r3145390788
##########
ambari-server/src/main/assemblies/server.xml:
##########
@@ -464,6 +464,19 @@
<outputDirectory>/usr/lib/ambari-server</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
+ <!--
Review Comment:
We should exclude them from individual dependencies which pulls them as transitive dependencies. Let's keep assembly clean from any kind of filtering.
--
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: dev-unsubscribe@ambari.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org