如何在使用sbt-native-packager打包sbt应用程序时包含其他依赖项

时间:2014-04-14 13:27:10

标签: sbt sbt-native-packager

我试图在包装应用程序(universal:packageBindebian:packageBin)时包含breeze-natives依赖项,同时始终包含breeze依赖项。以下是我提出的建议:

val breezeDependencySettings = {
  val breezeUniversalNativesDependency =  libraryDependencies in Universal += D.breezeNatives
  val breezeDebianNativesDependency =  libraryDependencies in Debian += D.breezeNatives
  val breezeDependency = libraryDependencies += D.breeze
  Seq(breezeUniversalNativesDependency, breezeDebianNativesDependency, breezeDependency)
}

在我要打包的项目中,我使用

settings =  (mySettings) ++ SbtNativePackager.packageArchetype.java_server ++
    Dependencies.breezeDependencySettings

但是,breeze-natives依赖项不包含在universal:packageBin创建的最终包中。 (虽然正确包含了微风)

我做错了什么?

1 个答案:

答案 0 :(得分:0)

不是100%明确您的要求,但您是否尝试过ExportJars:= true?

请在我的问题中查看我的构建摘录:https://stackoverflow.com/questions/23035100/how-to-remove-version-from-artifactid-generated-by-sbt-native-packager