Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK classes (org.w3c.dom.**) are relocated #874

Open
adrianbk opened this issue Jul 11, 2023 · 0 comments
Open

JDK classes (org.w3c.dom.**) are relocated #874

adrianbk opened this issue Jul 11, 2023 · 0 comments
Labels

Comments

@adrianbk
Copy link

Please check the User Guide before submitting "how do I do 'x'?" questions!

Shadow Version

com.github.johnrengelman:shadow:8.1.1

Gradle Version

Gradle 8.2
JVM: 17.0.3 (Azul Systems, Inc. 17.0.3+7-LTS)

Expected Behaviour

The contents of the relocated classes (deprecatedpain.org.apache.axis2.description.AxisService) should not contain relocated imports of JDK classes like org.w3c.dom.Document

Actual Behavior

The below imports are incorrectly relocated.

import deprecatedpain.org.w3c.dom.Document;
import deprecatedpain.org.w3c.dom.Element;
import deprecatedpain.org.w3c.dom.NamedNodeMap;
import deprecatedpain.org.w3c.dom.Node;
import deprecatedpain.org.w3c.dom.NodeList;

One suspicion is that the transitive dependency (jaxen:jaxen:1.1.6) has one class with a package name overlap: org.w3c.dom.UserDataHandler and that somehow causes relocation to consider everything under org.w3c.dom as relocated.

Though not reproduced in the below scripts, another observed example was import deprecatedpain.org.xml.sax.SAXException

Gradle Build Script(s)

The following can be used to reproduce: https://github.com/adrianbk/axis2-shadow

./gradlew soap-service:shadowJar the-monolith:compileJava the-monolith:runLoader

Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)

jar contents: https://gist.github.com/adrianbk/77f48e6f1b37416560dd42099d31e0f7

@Goooler Goooler added the bug label Jan 26, 2025
@Goooler Goooler changed the title JDK Classes are being relocated JDK classes (org.w3c.dom.**) are relocated Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants