sbt / sbt-assembly

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

Exception thrown "pomProperties" is null #516

Open baovitt opened 7 months ago

baovitt commented 7 months ago

Asking here because I'm boycotting stack overflow.

I'm able to run my project successfully in the sbt console, but am unable to run it an assembled jar, where I'm met with the following error:

Suppressed: java.lang.NullPointerException: Cannot invoke "java.io.InputStream.close()" because "pomProperties" is null

I'm assuming that pomProperties is related to sbt-assembly and this is the behavior of some bug, but I could be incorrect, in which case I'd appreciate greatly any guidance in the right direction. For context my mergeStrategy is the following:

assemblyMergeStrategy in assembly := {
  case PathList("META-INF", "versions", "9", "module-info.class") => MergeStrategy.first
  case PathList("META-INF", "io.netty.versions.properties") => MergeStrategy.concat
  case PathList("META-INF", xs @ _*) => MergeStrategy.discard
  case "application.conf" => MergeStrategy.concat
  case PathList("deriving.conf") => MergeStrategy.concat
  case "module-info.class" => MergeStrategy.first

  case x =>
    val oldStrategy = (assemblyMergeStrategy in assembly).value
    oldStrategy(x)
}

I'm using version 2.1.5. Thanks in advance