Title: docker-java-transport-zerodep fails to relocate org/publicsuffix/list/effective_tld_names.dat · Issue #2625 · docker-java/docker-java · GitHub
Open Graph Title: docker-java-transport-zerodep fails to relocate org/publicsuffix/list/effective_tld_names.dat · Issue #2625 · docker-java/docker-java
X Title: docker-java-transport-zerodep fails to relocate org/publicsuffix/list/effective_tld_names.dat · Issue #2625 · docker-java/docker-java
Description: Problem docker-java-transport-zerodep shades httpclient5 internally, relocating its classes from org.apache.* to com.github.dockerjava.zerodep.shaded.org.apache.*. However, the org/publicsuffix/list/effective_tld_names.dat resource bundl...
Open Graph Description: Problem docker-java-transport-zerodep shades httpclient5 internally, relocating its classes from org.apache.* to com.github.dockerjava.zerodep.shaded.org.apache.*. However, the org/publicsuffix/lis...
X Description: Problem docker-java-transport-zerodep shades httpclient5 internally, relocating its classes from org.apache.* to com.github.dockerjava.zerodep.shaded.org.apache.*. However, the org/publicsuffix/lis...
Opengraph URL: https://github.com/docker-java/docker-java/issues/2625
X: @github
Domain: github-redirect.dependabot.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"docker-java-transport-zerodep fails to relocate org/publicsuffix/list/effective_tld_names.dat","articleBody":"## Problem\n\n`docker-java-transport-zerodep` shades `httpclient5` internally, relocating its classes from `org.apache.*` to `com.github.dockerjava.zerodep.shaded.org.apache.*`. However, the `org/publicsuffix/list/effective_tld_names.dat` resource bundled by httpclient5 is **not relocated** — it remains at its original path inside zerodep's jar.\n\nWhen a project depends on both `docker-java-transport-zerodep` and `httpclient5` directly (e.g. via WireMock, Spring's RestClient, etc.), two copies of `effective_tld_names.dat` land on the classpath at the same path. Maven's `duplicate-finder-maven-plugin` fails the build. This failure is normally not a problem, but it can become one.\n\nSince, `PublicSuffixMatcherLoader` (already shaded to `com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.psl.PublicSuffixMatcherLoader`) contains the hardcoded absolute resource path `/org/publicsuffix/list/effective_tld_names.dat` in its bytecode, it was not updated by the shade plugin's string relocation because the path uses slash notation with a leading `/`, not dot notation.\n\n## Fix\n\nAdd two relocation entries to the shade plugin config in `docker-java-transport-zerodep/pom.xml`:\n\n```xml\n\u003c!-- Relocates the resource file itself --\u003e\n\u003crelocation\u003e\n \u003cpattern\u003eorg.publicsuffix\u003c/pattern\u003e\n \u003cshadedPattern\u003ecom.github.dockerjava.zerodep.shaded.org.publicsuffix\u003c/shadedPattern\u003e\n\u003c/relocation\u003e\n\u003c!-- Fixes the absolute-path string literal in PublicSuffixMatcherLoader bytecode --\u003e\n\u003crelocation\u003e\n \u003crawString\u003etrue\u003c/rawString\u003e\n \u003cpattern\u003e/org/publicsuffix\u003c/pattern\u003e\n \u003cshadedPattern\u003e/com/github/dockerjava/zerodep/shaded/org/publicsuffix\u003c/shadedPattern\u003e\n\u003c/relocation\u003e\n```\n\nThis moves the dat file to `com/github/dockerjava/zerodep/shaded/org/publicsuffix/list/effective_tld_names.dat` inside the jar and updates the `getResource()` call in the shaded bytecode to match — zerodep remains fully self-contained.\n","author":{"url":"https://github.com/JKomoroski","@type":"Person","name":"JKomoroski"},"datePublished":"2026-05-12T15:38:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/2625/docker-java/issues/2625"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e7290717-d2f3-0895-e466-c0e94c390e10 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6C2:1F16:26EFFA8:3883E92:6A4FD470 |
| html-safe-nonce | 69ad4fbc9736f15990fff0ffb25a87de8c78c8179c0374a7301b88a49acc5a75 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkMyOjFGMTY6MjZFRkZBODozODgzRTkyOjZBNEZENDcwIiwidmlzaXRvcl9pZCI6IjcxMTU0OTA5NzcyNzc0MzA4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5d4f11c57b211450dd9c07da76471ebd3c03e5cee3437ea66afecdcda04e1ce2 |
| hovercard-subject-tag | issue:4430502647 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docker-java/docker-java/2625/issue_layout |
| twitter:image | https://opengraph.githubassets.com/18cdce1635313a2b4321aa81310ad6bc13e28ffd1fcd9b28c6df6450745510b1/docker-java/docker-java/issues/2625 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/18cdce1635313a2b4321aa81310ad6bc13e28ffd1fcd9b28c6df6450745510b1/docker-java/docker-java/issues/2625 |
| og:image:alt | Problem docker-java-transport-zerodep shades httpclient5 internally, relocating its classes from org.apache.* to com.github.dockerjava.zerodep.shaded.org.apache.*. However, the org/publicsuffix/lis... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JKomoroski |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c |
| turbo-cache-control | no-preview |
| go-import | github.com/docker-java/docker-java git https://github.com/docker-java/docker-java.git |
| octolytics-dimension-user_id | 7772003 |
| octolytics-dimension-user_login | docker-java |
| octolytics-dimension-repository_id | 20415251 |
| octolytics-dimension-repository_nwo | docker-java/docker-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20415251 |
| octolytics-dimension-repository_network_root_nwo | docker-java/docker-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 142593e66413bbae27fd485859993597d5a3b104 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width