0

まず、私はScalaとSBTの初心者なので、これが私の最初のプロジェクトです。Herokuにscalaアプリをデプロイしようとしています。このエラーが発生します:

error: not found: value StartScriptPlugin StartScriptPlugin.stage in Compile := Unit

これが私のbuild.sbtです。何が問題なのですか?これはCompile:= UnitのStartScriptPlugin.stageにあるものですが、いくつかの例を見つけて、常にこのように使用しています。ありがとう

name := "Survey server" 

version := "1.0"

scalaVersion := "2.9.2"

resolvers ++= Seq("repo.codahale.com" at "http://repo.codahale.com", Classpaths.typesafeResolver)

addSbtPlugin("com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.3")

StartScriptPlugin.stage in Compile := Unit

EclipseKeys.withSource := true

libraryDependencies ++= Seq( 
"net.databinder" %% "unfiltered-filter" % "0.6.3", 
"net.databinder" %% "unfiltered-jetty" % "0.6.3", 
"net.databinder.dispatch" %% "core" % "0.9.0", 
"com.codahale" % "jerkson_2.9.1" % "0.5.0", 
"org.scalaquery" % "scalaquery_2.9.1" % "0.10.0-M1", 
"postgresql" % "postgresql" % "9.1-901.jdbc4" )
4

1 に答える 1

1

プロジェクトが StartScriptPlugin を使用していることを SBT に伝える必要があります。これは、 のaddSbtPluginコマンドを使用して行いproject/plugins.sbtます。これはすべて SBT ドキュメントで説明されています: https://github.com/harrah/xsbt/wiki/Getting-Started-Using-Plugins

使用しようとしているプラ​​グインのドキュメントには、 に追加する必要があるものも正確に記載されていますproject/plugins.sbt。SBT 0.11 の場合、これは次のようになります。

resolvers += Classpaths.typesafeResolver

addSbtPlugin( "com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.2" )

https://github.com/typesafehub/xsbt-start-script-pluginを参照してください

于 2012-09-26T09:32:22.793 に答える