我想使用sbt和sbt-native-package用Scala编写的代码创建一个Debian包。
但是当我尝试在sbt控制台中执行debian:package-bin
时,我收到此错误:
[trace] Stack trace suppressed: run last debian:debianControlFile for the full output.
[error] (debian:debianControlFile) packageDescription in Debian cannot be empty. Use
[error] packageDescription in Debian := "My package Description"
这很奇怪,因为在build.sbt
我的packageDescription
设置如下:
import com.typesafe.sbt.SbtNativePackager._
import com.typesafe.sbt.packager.Keys._
import NativePackagerKeys._
import com.typesafe.sbt.packager.archetypes.ServerLoader.{SystemV, Upstart}
serverLoading in Debian := SystemV
name := "testApp"
version := "1.0"
organization := "com.testApp"
scalaVersion := "2.10.3"
maintainer in Debian := "gdc <aaa@aaa.com>"
packageSummary in Debian := "testApp"
packageDescription in Debian := "testApp"
packageArchetype.java_server
exportJars := true
我使用packageDescription := "testApp"
或packageDescription in Linux := "testApp"
进行了测试,但都没有效果。
答案 0 :(得分:3)
移动线
packageArchetype.java_server
就在导入之后,所以它不会覆盖设置。
import com.typesafe.sbt.SbtNativePackager._
import com.typesafe.sbt.packager.Keys._
import NativePackagerKeys._
import com.typesafe.sbt.packager.archetypes.ServerLoader.{SystemV, Upstart}
packageArchetype.java_server
serverLoading in Debian := SystemV
name := "testApp"
version := "1.0"
organization := "com.testApp"
scalaVersion := "2.10.3"
maintainer in Debian := "gdc <aaa@aaa.com>"
packageSummary in Debian := "testApp"
packageDescription in Debian := "testApp"
exportJars := true