Open marcospereira opened 4 years ago
Hi @marcospereira Have you considered a case where multiple dependencies have application.conf with the same keys mapped to different values ? I cannot find anywhere how "concat" would handle such a scenario. Is there anyway I could customise to pick the right key value pair or if both the key-value pairs are needed by different dependencies, would shading help here ? Please help
Problem
Currently, sbt-assembly fails if the dependency jar artifact cointains other configuration files (in the sense of Lightbend Config) besides
reference.conf
,reference-overrides.conf
, andapplication.conf
. For example, if aversion.conf
file is present, like the one in Akka and possibly others.The failure will be similar to:
Expectation
.conf
files such Akka's version.conf should be considered configuration files, and therefore concatenated by default.A fix should involve changing the code here: https://github.com/sbt/sbt-assembly/blob/4840a2f972598c65a2ae1106bf2393de0b392ad0/src/main/scala/sbtassembly/Assembly.scala#L309-L313
Notes
Lighbend Config supports
application.properties
, andapplication.json
besidesapplication.conf
, although those are arguably less popular. Anyhow, maybe sbt-assembly should also handle them out-of-the-box.