assembly-merge-strategy issues using sbt-assembly

前端 未结 7 2123
我寻月下人不归
我寻月下人不归 2020-12-02 23:24

I am trying to convert a scala project into a deployable fat jar using sbt-assembly. When I run my assembly task in sbt I am getting the following error:

Mer         


        
7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 23:47

    For the new sbt version (sbt-version :0.13.11), I was getting the error for slf4j; for the time being took the easy way out : Please also check the answer here Scala SBT Assembly cannot merge due to de-duplication error in StaticLoggerBinder.class where sbt-dependency-graph tool is mentioned which is pretty cool to do this manually

    assemblyMergeStrategy in assembly <<= (assemblyMergeStrategy in assembly) {
      (old) => {
        case PathList("META-INF", xs @ _*) => MergeStrategy.discard
        case x => MergeStrategy.first
      }
    }
    

提交回复
热议问题