我想用Scala用sbt和sbt-native-package创建一个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"
做了测试,但都没有工作。
移动行
packageArchetype.java_server
应该在导入之后,所以它不会覆盖设置。
build.sbt
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