How can I add unmanaged JARs in sbt-assembly to the final fat JAR?

こ雲淡風輕ζ 提交于 2019-12-03 10:32:21

Figured out I just have to add them explicitly as unmanaged dependencies in Build.scala, they are not automatically pulled in from the lib folder. Adding this line to settings worked:

unmanagedJars in Compile += file("lib/vertica_jdk_5.jar")

For a single project setup, putting jars into lib should work. If you have multi-project setup the lib directory would be under each subproject like app/lib.

Just an update for those searching unmanaged dependencies: Updated documentation for 0.13.2 is here: http://www.scala-sbt.org/release/docs/Getting-Started/Library-Dependencies.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!