使用sbt-native-packager时的模糊引用

时间:2014-12-17 20:13:51

标签: sbt sbt-native-packager

我正在尝试使用sbt-native-packager来创建deb文件。当我运行sbt时,它会抱怨模糊的引用,因为它加载了build.sbt:

mydir/build.sbt:21: error: reference to maintainer is ambiguous;
it is imported twice in the same scope by
import NativePackagerKeys._
and import _root_.com.typesafe.sbt.SbtNativePackager.autoImport._
maintainer in Debian := "Your Name <your@email.com>"

[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

我的build.sbt是:

import com.typesafe.sbt.SbtNativePackager._
import NativePackagerKeys._

organization := "org.bodhi"

name := "HelloRemote"

version := "1.0"

scalaVersion := "2.11.4"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.3.4",
  "com.typesafe.akka" %% "akka-remote" % "2.3.4"
)

packageArchetype.java_application

maintainer in Debian := "Your Name <your@email.com>"

我正在使用sbt 0.13.7;我的packager.sbt文件包含:     addSbtPlugin(“com.typesafe.sbt”%“sbt-native-packager”%“1.0.0-M3”)

由于

1 个答案:

答案 0 :(得分:3)

只需删除导入NativePackagerKeys ._