为什么当build.sbt有设置时,debian:package-bin抛出“Debian中的packageDescription不能为空”?

时间:2014-06-26 15:18:05

标签: scala sbt sbt-native-packager

我想使用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"进行了测试,但都没有效果。

1 个答案:

答案 0 :(得分:3)

移动线

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