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

Shading problems #32

Open
nightscape opened this issue Jun 27, 2019 · 0 comments
Open

Shading problems #32

nightscape opened this issue Jun 27, 2019 · 0 comments

Comments

@nightscape
Copy link
Contributor

First of all thanks for this nice plugin!
I'm trying to use it to shade commons-compress for which Spark provides a too old version:

shadedDeps ++= Seq(
  "org.apache.poi" ^ "poi-ooxml" ^ "4.0.0",
  "org.apache.commons" ^ "commons-compress" ^ "1.18",
  "com.fasterxml.jackson.core" ^ "jackson-core" ^ "2.8.8",
)

shadeRenames ++= Seq(
  "com.fasterxml.jackson.**" -> "shadeio.jackson.@1",
  "org.apache.commons.compress.**" -> "shadeio.commons.compress.@1",
)

publishThinShadedJar

The included poi-ooxml correctly references shadeio.commons.compress, but at runtime there's still an exception that suggests that a version of poi-ooxml is used that is not referencing shadeio.commons.compress, but rather the ordinary one from Spark.
I inspected the pom.xml and poi-ooxml is still listed as an ordinary dependency, although it is already included in the thin shaded JAR.

This might lead to the classes from the dependency JAR getting used instead of the thin shaded ones, correct?

Should the dependencies that are already included in the JAR be removed from the explicit dependencies in pom.xml automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant