How to include an external jar file into the jar with package?

前端 未结 7 2391
-上瘾入骨i
-上瘾入骨i 2020-12-08 02:26

My project has dependency on an external jar. I have created a directory lib and have copied the jar file into it. This is my build.sbt:

         


        
7条回答
  •  广开言路
    2020-12-08 02:44

    I was racking my brain with resolvers and settingKey vars, but it seems this is the most straight-forward way (https://www.scala-sbt.org/release/docs/Library-Dependencies.html):

    resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"

    then just add to libraryDependencies as you normally would

    libraryDependencies += "" % "" % ""

提交回复
热议问题