Skip to content

Shading problems #32

@nightscape

Description

@nightscape

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions