所以到目前爲止我已經編譯我的SBT斯卡拉項目(通過類型安全的堆棧)。我想通過sbt-assembly在幾臺機器上運行代碼。遵循指示,我所做的唯一更改是在我的project/Build.scala
文件中。下面是相關的部分:獲取SBT組裝工作
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases",
resolvers += "artifactory" at "http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases",
libraryDependencies += "com.eed3si9n" % "sbt-assembly" % "0.8.3"
當我運行sbt compile
不過,我得到這個錯誤:
sbt.ResolveException: unresolved dependency: com.eed3si9n#sbt-assembly/scala_2.9.1/sbt_0.11.2;0.8.3: not found
。
我在做什麼錯?
謝謝!
編輯 創建一個build.sbt
文件相同的文件夾中Build.scala
(文件夾/project/
),並有這兩條線在它:
Seq[Setting[_]](resolvers += "artifactory" at "http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases",
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.3"))
現在的錯誤是:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.eed3si9n#sbt-assembly;0.8.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.eed3si9n:sbt-assembly:0.8.3 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn]
[error] {file:/Users/myname/current/projectname/project/}default-d7da9a/*:update: sbt.ResolveException: unresolved dependency: com.eed3si9n#sbt-assembly;0.8.3: not found
EDIT 2 嗯,以後我要做一個成功的sbt compile
,S我是否可以進入sbt
控制檯並輸入assembly
?
> assembly
[error] Not a valid command: assembly
[error] Not a valid project ID: assembly
[error] Not a valid configuration: assembly
[error] Not a valid key: assembly
[error] assembly
[error]
編輯3 JK得到它。必須按照GitHub自述文件中的說明添加build.sbt
信息。
「信息作爲在GitHub自述文件中指定「 - 請鏈接? – Vasily802