You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docker-java-transport-zerodep fails to relocate org/publicsuffix/list/effective_tld_names.dat #2625
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.
When 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.
Since, 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.
Fix
Add two relocation entries to the shade plugin config in docker-java-transport-zerodep/pom.xml:
<!-- Relocates the resource file itself -->
<relocation>
<pattern>org.publicsuffix</pattern>
<shadedPattern>com.github.dockerjava.zerodep.shaded.org.publicsuffix</shadedPattern>
</relocation>
<!-- Fixes the absolute-path string literal in PublicSuffixMatcherLoader bytecode -->
<relocation>
<rawString>true</rawString>
<pattern>/org/publicsuffix</pattern>
<shadedPattern>/com/github/dockerjava/zerodep/shaded/org/publicsuffix</shadedPattern>
</relocation>
This 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.
My testing for this change within my own projects was successful (I use it by way of test-containers). . This should be a low risk change, but I don't have a deep understanding of how the zerodep jar is used across the ecosystem.
I was able to verify that the shaded version of PublicSuffixMatcherLoader at com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.psl.PublicSuffixMatcherLoader has the correctly updated PUBLIC_SUFFIX_LIST:
private static final String PUBLIC_SUFFIX_LIST = "/com/github/dockerjava/zerodep/shaded/org/publicsuffix/list/effective_tld_names.dat";
@eddumelendez Sorry to ping you directly, but I'm not sure if this issue and associated PR have caught the attention of docker-java maintainers or if it was lost in the noise.
Activity
JKomoroski commentedon May 12, 2026
My testing for this change within my own projects was successful (I use it by way of test-containers). . This should be a low risk change, but I don't have a deep understanding of how the zerodep jar is used across the ecosystem.
JKomoroski commentedon May 20, 2026
I was able to verify that the shaded version of
PublicSuffixMatcherLoaderatcom.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.psl.PublicSuffixMatcherLoaderhas the correctly updatedPUBLIC_SUFFIX_LIST:bedaka commentedon Jun 2, 2026
We're also affected by this, would be great to fix it.
JKomoroski commentedon Jun 2, 2026
Can you test my branch to confirm it is a fix for your use case?
JKomoroski commentedon Jun 12, 2026
@eddumelendez Sorry to ping you directly, but I'm not sure if this issue and associated PR have caught the attention of docker-java maintainers or if it was lost in the noise.
antonmos commentedon Sep 4, 2026
following up!
JKomoroski commentedon Sep 25, 2026
Anyone have any idea on if this is monitored?