2012-09-25 2 views
0

먼저 스칼라 및 SBT 초보자이므로이 프로젝트가 첫 번째 프로젝트입니다. 나는 Heroku에 스칼라 응용 프로그램을 배포하려고합니다. 이 오류가 나타납니다.오류 : 찾을 수 없음 : 값 StartScriptPlugin StartScriptPlugin.stage in Compile : = Unit

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

여기 내 build.sbt입니다. 무엇이 잘못 되었나요? 제가 알기로 StartScriptPlugin.stage가있는 Compile : = Unit입니다. 그러나 몇 가지 예제를 발견하고 항상이 방법을 사용합니다. 감사합니다

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") 

답변

1

프로젝트에서 StartScriptPlugin을 사용하도록 SBT에 알릴 필요가 있습니다. 이는 project/plugins.sbt에서 addSbtPlugin 명령을 사용하여 수행됩니다. 이 모든 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

+0

위의 SO에 의해 잘 렸습니다 스크립트의 끝을 참조하십시오. 제공된 링크를 따라 정확한 스크립트를보십시오. –

+0

감사합니다. Regis :) 작동 중입니다! 나는 SBT의 재귀 적 성격을 깨닫지 못했고 그들이 project/build.sbt를 참조하고 build.sbt를 변경한다는 것을 알지 못했다. – user1698641

관련 문제