sbt / sbt-assembly

Deploy über-JARs. Restart processes. (port of codahale/assembly-sbt)
MIT License
1.94k stars 223 forks source link

Shading breaks META-INF/services (1.2.0 regression) #515

Open piotrp opened 7 months ago

piotrp commented 7 months ago

Enabling shading by setting assemblyShadeRules makes some files in META-INF/services empty, an example is org.apache.kafka.common.config.provider.ConfigProvider from Kafka client library.

Sample project

project/build.properties

sbt.version=1.9.7

project/plugins.sbt

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.4")

build.sbt

ThisBuild / version := "0.1"
ThisBuild / assembly / logLevel := Level.Debug
ThisBuild / assembly / assemblyShadeRules := Seq(
  ShadeRule.rename("xyz.**" -> "shaded.xyz.@1").inAll
)

libraryDependencies ++= Seq(
  "org.apache.kafka" % "kafka-clients" % "3.3.2"
)

lazy val assemblyTest = project in file(".")
piotrp commented 7 months ago

After more testing it looks like the same issue as #490, i.e. it's broken when building on Windows