使用sbt构建命令行应用程序。

时间:2021-04-30 00:11:03

Anybody successfully followed http://www.scala-sbt.org/0.13/docs/Command-Line-Applications.html using latest sbt 0.13.7 ?

任何人都成功地遵循了http://www.scala-sbt.org/0.13/ docs/command - line applications.html使用最新的sbt 0.13.7 ?

I get unresolved dependency "org.scala-sbt#command;0.12.0: not found" for 0.12.0. Trying command version 0.13.7 gets compile errors in Main.scala file around initialGlobalLogging:

我得到了未解决的依赖项“org.scala-sbt#命令;0.12.0:not found”为0.12.0。尝试命令版本0.13.7主要是编译错误。scala文件initialGlobalLogging左右:

[error] Unspecified value parameter console.                                       
[error]      GlobalLogging.initial(MainLogging.globalDefault _, File.crea          
teTempFile("hello", "log") )                                                       
[error]      GlobalLogging.initial(MainLogging.globalDefault _, File.crea          
teTempFile("hello", "log") )                                                       

Thank you

谢谢你!

2 个解决方案

#1


2  

0.13.7 seems to have updated the type and number of parameters for GlobalLogging.initial(). (http://www.scala-sbt.org/0.13.7/api/#sbt.GlobalLogging$)

0.13.7似乎已经更新了GlobalLogging.initial()的参数类型和数量。(http://www.scala-sbt.org/0.13.7/api/ sbt.GlobalLogging $)

Try changing the last two lines in Main.scala:

尝试改变Main.scala中的最后两行:

from

/** Configures logging to log to a temporary backing file as well as to the console. 
* An application would need to do more here to customize the logging level and
* provide access to the backing file (like sbt's last command and logLevel setting).*/
def initialGlobalLogging: GlobalLogging =
      GlobalLogging.initial(MainLogging.globalDefault _, File.createTempFile("hello", "log"))

to

val consoleOut = ConsoleOut.systemOut
def initialGlobalLogging: GlobalLogging =
   GlobalLogging.initial(MainLogging.globalDefault(consoleOut).apply, java.io.File.createTempFile("hello", "log"), consoleOut )

#2


0  

Yes, I got same error. However, the error was resolved by renaming the file as "project/build.properties" and specifying the file via -Dsbt.repository.config:

是的,我有同样的错误。但是,错误是通过将文件重命名为“项目/构建”来解决的。属性,并通过-Dsbt.repository.config来指定文件。

~/Documents/spark/hello $ sbt -Dsbt.repository.config=./project/build.properties
[info] Loading project definition from /Users/suztomo/Documents/spark/hello/project
[warn] Multiple resolvers having different access mechanism configured with same name 'typesafe-ivy-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Updating {file:/Users/suztomo/Documents/spark/hello/project/}hello-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-library;2.10.4!scala-library.jar (6413ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.7/jars/sbt.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#sbt;0.13.7!sbt.jar (410ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.7/jars/main.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#main;0.13.7!main.jar (1955ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.7/jars/compiler-interface-src.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.7!compiler-interface-src.jar (197ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.7!compiler-interface-bin.jar (304ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.7!compiler-interface-bin.jar (383ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.7!compiler-interface-bin.jar (438ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.7!compiler-interface-bin.jar (556ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.7/jars/actions.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#actions;0.13.7!actions.jar (604ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.7/jars/main-settings.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#main-settings;0.13.7!main-settings.jar (478ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.13.7/jars/interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#interface;0.13.7!interface.jar (190ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.7/jars/io.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#io;0.13.7!io.jar (364ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.7/jars/ivy.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#ivy;0.13.7!ivy.jar (699ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/0.13.7/jars/launcher-interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#launcher-interface;0.13.7!launcher-interface.jar (187ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.13.7/jars/logging.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#logging;0.13.7!logging.jar (245ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logic/0.13.7/jars/logic.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#logic;0.13.7!logic.jar (189ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.13.7/jars/process.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#process;0.13.7!process.jar (247ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/run/0.13.7/jars/run.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#run;0.13.7!run.jar (253ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.7/jars/command.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#command;0.13.7!command.jar (297ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.13.7/jars/classpath.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#classpath;0.13.7!classpath.jar (285ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.7/jars/completion.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#completion;0.13.7!completion.jar (634ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.7/jars/api.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#api;0.13.7!api.jar (359ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-integration/0.13.7/jars/compiler-integration.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.7!compiler-integration.jar (247ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-ivy-integration/0.13.7/jars/compiler-ivy-integration.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.7!compiler-ivy-integration.jar (186ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/relation/0.13.7/jars/relation.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#relation;0.13.7!relation.jar (189ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/task-system/0.13.7/jars/task-system.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#task-system;0.13.7!task-system.jar (322ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tasks/0.13.7/jars/tasks.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#tasks;0.13.7!tasks.jar (465ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tracking/0.13.7/jars/tracking.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#tracking;0.13.7!tracking.jar (270ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/testing/0.13.7/jars/testing.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#testing;0.13.7!testing.jar (241ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar (12424ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.10.4/scala-reflect-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.4!scala-reflect.jar (3486ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.13.7/jars/control.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#control;0.13.7!control.jar (268ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.7/jars/collections.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#collections;0.13.7!collections.jar (418ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/2.11/jline-2.11.jar ...
[info]  [SUCCESSFUL ] jline#jline;2.11!jline.jar (352ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.7/jars/incremental-compiler.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.7!incremental-compiler.jar (622ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.7/jars/compile.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compile;0.13.7!compile.jar (236ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/persist/0.13.7/jars/persist.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#persist;0.13.7!persist.jar (264ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classfile/0.13.7/jars/classfile.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#classfile;0.13.7!classfile.jar (210ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbinary/sbinary_2.10/0.4.2/jars/sbinary_2.10.jar ...
[info]  [SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (260ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cross/0.13.7/jars/cross.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#cross;0.13.7!cross.jar (190ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt.ivy/ivy/2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f/jars/ivy.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f!ivy.jar (1006ms)
[info] downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.46/jsch-0.1.46.jar ...
[info]  [SUCCESSFUL ] com.jcraft#jsch;0.1.46!jsch.jar (322ms)
[info] downloading https://repo1.maven.org/maven2/org/json4s/json4s-native_2.10/3.2.10/json4s-native_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-native_2.10;3.2.10!json4s-native_2.10.jar (194ms)
[info] downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.6.0/jawn-parser_2.10-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (179ms)
[info] downloading https://repo1.maven.org/maven2/org/spire-math/json4s-support_2.10/0.6.0/json4s-support_2.10-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.spire-math#json4s-support_2.10;0.6.0!json4s-support_2.10.jar (155ms)
[info] downloading https://repo1.maven.org/maven2/org/json4s/json4s-core_2.10/3.2.10/json4s-core_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (664ms)
[info] downloading https://repo1.maven.org/maven2/org/json4s/json4s-ast_2.10/3.2.10/json4s-ast_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-ast_2.10;3.2.10!json4s-ast_2.10.jar (214ms)
[info] downloading https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.6/paranamer-2.6.jar ...
[info]  [SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.6!paranamer.jar (157ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scalap/2.10.0/scalap-2.10.0.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scalap;2.10.0!scalap.jar (517ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cache/0.13.7/jars/cache.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#cache;0.13.7!cache.jar (391ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/test-agent/0.13.7/jars/test-agent.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#test-agent;0.13.7!test-agent.jar (311ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar ...
[error] Server access Error: Operation timed out url=https://repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar.sha1
[info]  [SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (11439ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.7/jars/apply-macro.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.7!apply-macro.jar (498ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/jline/2.10.4/jline-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#jline;2.10.4!jline.jar (424ms)
[info] downloading https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...
[info]  [SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (220ms)
[info] Done updating.
[info] Set current project to hello (in build file:/Users/suztomo/Documents/spark/hello/)
> compile
[info] Updating {file:/Users/suztomo/Documents/spark/hello/}hello...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.12.0/jars/command.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#command;0.12.0!command.jar (304ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.12.0/jars/interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#interface;0.12.0!interface.jar (200ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.12.0/jars/io.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#io;0.12.0!io.jar (321ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/0.12.0/jars/launcher-interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#launcher-interface;0.12.0!launcher-interface.jar (181ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.12.0/jars/logging.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#logging;0.12.0!logging.jar (211ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.12.0/jars/completion.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#completion;0.12.0!completion.jar (343ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.12.0/jars/classpath.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#classpath;0.12.0!classpath.jar (197ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.12.0/jars/control.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#control;0.12.0!control.jar (183ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.12.0/jars/process.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#process;0.12.0!process.jar (239ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.12.0/jars/collections.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#collections;0.12.0!collections.jar (604ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/1.0/jline-1.0.jar ...
[info]  [SUCCESSFUL ] jline#jline;1.0!jline.jar (251ms)
[info] Done updating.
[success] Total time: 7 s, completed 2014/11/27 15:36:41

For more detailed explanation, please refer to (sbt configuration documentation)

要获得更详细的解释,请参考(sbt配置文档)

Sharing my environment to compare with yours:

与你分享我的环境:

~/Documents/spark/hello $ which java                   
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java
~/Documents/spark/hello $ which sbt
/usr/local/bin/sbt
~/Documents/spark/hello $ brew info sbt
sbt: stable 0.13.7 (bottled)
...

#1


2  

0.13.7 seems to have updated the type and number of parameters for GlobalLogging.initial(). (http://www.scala-sbt.org/0.13.7/api/#sbt.GlobalLogging$)

0.13.7似乎已经更新了GlobalLogging.initial()的参数类型和数量。(http://www.scala-sbt.org/0.13.7/api/ sbt.GlobalLogging $)

Try changing the last two lines in Main.scala:

尝试改变Main.scala中的最后两行:

from

/** Configures logging to log to a temporary backing file as well as to the console. 
* An application would need to do more here to customize the logging level and
* provide access to the backing file (like sbt's last command and logLevel setting).*/
def initialGlobalLogging: GlobalLogging =
      GlobalLogging.initial(MainLogging.globalDefault _, File.createTempFile("hello", "log"))

to

val consoleOut = ConsoleOut.systemOut
def initialGlobalLogging: GlobalLogging =
   GlobalLogging.initial(MainLogging.globalDefault(consoleOut).apply, java.io.File.createTempFile("hello", "log"), consoleOut )

#2


0  

Yes, I got same error. However, the error was resolved by renaming the file as "project/build.properties" and specifying the file via -Dsbt.repository.config:

是的,我有同样的错误。但是,错误是通过将文件重命名为“项目/构建”来解决的。属性,并通过-Dsbt.repository.config来指定文件。

~/Documents/spark/hello $ sbt -Dsbt.repository.config=./project/build.properties
[info] Loading project definition from /Users/suztomo/Documents/spark/hello/project
[warn] Multiple resolvers having different access mechanism configured with same name 'typesafe-ivy-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Updating {file:/Users/suztomo/Documents/spark/hello/project/}hello-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-library;2.10.4!scala-library.jar (6413ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.7/jars/sbt.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#sbt;0.13.7!sbt.jar (410ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.7/jars/main.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#main;0.13.7!main.jar (1955ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.7/jars/compiler-interface-src.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.7!compiler-interface-src.jar (197ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.7!compiler-interface-bin.jar (304ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.7!compiler-interface-bin.jar (383ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.7!compiler-interface-bin.jar (438ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.7/jars/compiler-interface-bin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.7!compiler-interface-bin.jar (556ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.7/jars/actions.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#actions;0.13.7!actions.jar (604ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.7/jars/main-settings.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#main-settings;0.13.7!main-settings.jar (478ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.13.7/jars/interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#interface;0.13.7!interface.jar (190ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.7/jars/io.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#io;0.13.7!io.jar (364ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.7/jars/ivy.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#ivy;0.13.7!ivy.jar (699ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/0.13.7/jars/launcher-interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#launcher-interface;0.13.7!launcher-interface.jar (187ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.13.7/jars/logging.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#logging;0.13.7!logging.jar (245ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logic/0.13.7/jars/logic.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#logic;0.13.7!logic.jar (189ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.13.7/jars/process.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#process;0.13.7!process.jar (247ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/run/0.13.7/jars/run.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#run;0.13.7!run.jar (253ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.7/jars/command.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#command;0.13.7!command.jar (297ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.13.7/jars/classpath.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#classpath;0.13.7!classpath.jar (285ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.7/jars/completion.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#completion;0.13.7!completion.jar (634ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.7/jars/api.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#api;0.13.7!api.jar (359ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-integration/0.13.7/jars/compiler-integration.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.7!compiler-integration.jar (247ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-ivy-integration/0.13.7/jars/compiler-ivy-integration.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.7!compiler-ivy-integration.jar (186ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/relation/0.13.7/jars/relation.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#relation;0.13.7!relation.jar (189ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/task-system/0.13.7/jars/task-system.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#task-system;0.13.7!task-system.jar (322ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tasks/0.13.7/jars/tasks.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#tasks;0.13.7!tasks.jar (465ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tracking/0.13.7/jars/tracking.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#tracking;0.13.7!tracking.jar (270ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/testing/0.13.7/jars/testing.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#testing;0.13.7!testing.jar (241ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar (12424ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.10.4/scala-reflect-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.4!scala-reflect.jar (3486ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.13.7/jars/control.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#control;0.13.7!control.jar (268ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.7/jars/collections.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#collections;0.13.7!collections.jar (418ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/2.11/jline-2.11.jar ...
[info]  [SUCCESSFUL ] jline#jline;2.11!jline.jar (352ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.7/jars/incremental-compiler.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.7!incremental-compiler.jar (622ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.7/jars/compile.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#compile;0.13.7!compile.jar (236ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/persist/0.13.7/jars/persist.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#persist;0.13.7!persist.jar (264ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classfile/0.13.7/jars/classfile.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#classfile;0.13.7!classfile.jar (210ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbinary/sbinary_2.10/0.4.2/jars/sbinary_2.10.jar ...
[info]  [SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (260ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cross/0.13.7/jars/cross.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#cross;0.13.7!cross.jar (190ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt.ivy/ivy/2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f/jars/ivy.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f!ivy.jar (1006ms)
[info] downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.46/jsch-0.1.46.jar ...
[info]  [SUCCESSFUL ] com.jcraft#jsch;0.1.46!jsch.jar (322ms)
[info] downloading https://repo1.maven.org/maven2/org/json4s/json4s-native_2.10/3.2.10/json4s-native_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-native_2.10;3.2.10!json4s-native_2.10.jar (194ms)
[info] downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.6.0/jawn-parser_2.10-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (179ms)
[info] downloading https://repo1.maven.org/maven2/org/spire-math/json4s-support_2.10/0.6.0/json4s-support_2.10-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.spire-math#json4s-support_2.10;0.6.0!json4s-support_2.10.jar (155ms)
[info] downloading https://repo1.maven.org/maven2/org/json4s/json4s-core_2.10/3.2.10/json4s-core_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (664ms)
[info] downloading https://repo1.maven.org/maven2/org/json4s/json4s-ast_2.10/3.2.10/json4s-ast_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-ast_2.10;3.2.10!json4s-ast_2.10.jar (214ms)
[info] downloading https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.6/paranamer-2.6.jar ...
[info]  [SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.6!paranamer.jar (157ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scalap/2.10.0/scalap-2.10.0.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scalap;2.10.0!scalap.jar (517ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cache/0.13.7/jars/cache.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#cache;0.13.7!cache.jar (391ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/test-agent/0.13.7/jars/test-agent.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#test-agent;0.13.7!test-agent.jar (311ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar ...
[error] Server access Error: Operation timed out url=https://repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar.sha1
[info]  [SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (11439ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.7/jars/apply-macro.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.7!apply-macro.jar (498ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/jline/2.10.4/jline-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#jline;2.10.4!jline.jar (424ms)
[info] downloading https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...
[info]  [SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (220ms)
[info] Done updating.
[info] Set current project to hello (in build file:/Users/suztomo/Documents/spark/hello/)
> compile
[info] Updating {file:/Users/suztomo/Documents/spark/hello/}hello...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.12.0/jars/command.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#command;0.12.0!command.jar (304ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.12.0/jars/interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#interface;0.12.0!interface.jar (200ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.12.0/jars/io.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#io;0.12.0!io.jar (321ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/0.12.0/jars/launcher-interface.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#launcher-interface;0.12.0!launcher-interface.jar (181ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.12.0/jars/logging.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#logging;0.12.0!logging.jar (211ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.12.0/jars/completion.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#completion;0.12.0!completion.jar (343ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.12.0/jars/classpath.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#classpath;0.12.0!classpath.jar (197ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.12.0/jars/control.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#control;0.12.0!control.jar (183ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.12.0/jars/process.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#process;0.12.0!process.jar (239ms)
[info] downloading http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.12.0/jars/collections.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#collections;0.12.0!collections.jar (604ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/1.0/jline-1.0.jar ...
[info]  [SUCCESSFUL ] jline#jline;1.0!jline.jar (251ms)
[info] Done updating.
[success] Total time: 7 s, completed 2014/11/27 15:36:41

For more detailed explanation, please refer to (sbt configuration documentation)

要获得更详细的解释,请参考(sbt配置文档)

Sharing my environment to compare with yours:

与你分享我的环境:

~/Documents/spark/hello $ which java                   
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java
~/Documents/spark/hello $ which sbt
/usr/local/bin/sbt
~/Documents/spark/hello $ brew info sbt
sbt: stable 0.13.7 (bottled)
...