Thursday, April 21, 2016

Scala - setup environment - sbt, Scala IDE

Download sbt http://www.scala-sbt.org/download.html


Configure https proxy
 export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=webproxy -Dhttp.proxyPort=8080"  


Change sbt repository root
 export _JAVA_OPTIONS='-Duser.home=/d/vesedan/sbt-repository'  


Start sbt
 $ sbt  
 Getting org.scala-sbt sbt 0.13.11 ...  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.11/jars/sbt.jar ...  
     [SUCCESSFUL ] org.scala-sbt#sbt;0.13.11!sbt.jar (2209ms)  
 downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.6/scala-library-2.10.6.jar ...  
     [SUCCESSFUL ] org.scala-lang#scala-library;2.10.6!scala-library.jar (36565ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.11/jars/main.jar ...  
     [SUCCESSFUL ] org.scala-sbt#main;0.13.11!main.jar (14438ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.11/jars/compiler-interface.jar ...  
     [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.11!compiler-interface.jar (3732ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.11/jars/actions.jar ...  
     [SUCCESSFUL ] org.scala-sbt#actions;0.13.11!actions.jar (4983ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.11/jars/main-settings.jar ...  
     [SUCCESSFUL ] org.scala-sbt#main-settings;0.13.11!main-settings.jar (189535ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.13.11/jars/interface.jar ...  
     [SUCCESSFUL ] org.scala-sbt#interface;0.13.11!interface.jar (2385ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.11/jars/io.jar ...  
     [SUCCESSFUL ] org.scala-sbt#io;0.13.11!io.jar (3836ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.11/jars/ivy.jar ...  
     [SUCCESSFUL ] org.scala-sbt#ivy;0.13.11!ivy.jar (10631ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.13.11/jars/logging.jar ...  
     [SUCCESSFUL ] org.scala-sbt#logging;0.13.11!logging.jar (2493ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logic/0.13.11/jars/logic.jar ...  
     [SUCCESSFUL ] org.scala-sbt#logic;0.13.11!logic.jar (2893ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.13.11/jars/process.jar ...  
     [SUCCESSFUL ] org.scala-sbt#process;0.13.11!process.jar (3226ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/run/0.13.11/jars/run.jar ...  
     [SUCCESSFUL ] org.scala-sbt#run;0.13.11!run.jar (4793ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.11/jars/command.jar ...  
     [SUCCESSFUL ] org.scala-sbt#command;0.13.11!command.jar (3569ms)  
 downloading https://repo1.maven.org/maven2/org/scala-sbt/launcher-interface/1.0.0-M1/launcher-interface-1.0.0-M1.jar ...  
     [SUCCESSFUL ] org.scala-sbt#launcher-interface;1.0.0-M1!launcher-interface.jar (265ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.13.11/jars/classpath.jar ...  
     [SUCCESSFUL ] org.scala-sbt#classpath;0.13.11!classpath.jar (2508ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.11/jars/completion.jar ...  
     [SUCCESSFUL ] org.scala-sbt#completion;0.13.11!completion.jar (4228ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.11/jars/api.jar ...  
     [SUCCESSFUL ] org.scala-sbt#api;0.13.11!api.jar (6932ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-integration/0.13.11/jars/compiler-integration.jar ...  
     [SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.11!compiler-integration.jar (2715ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-ivy-integration/0.13.11/jars/compiler-ivy-integration.jar ...  
     [SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.11!compiler-ivy-integration.jar (2659ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/relation/0.13.11/jars/relation.jar ...  
     [SUCCESSFUL ] org.scala-sbt#relation;0.13.11!relation.jar (2618ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/task-system/0.13.11/jars/task-system.jar ...  
     [SUCCESSFUL ] org.scala-sbt#task-system;0.13.11!task-system.jar (2604ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tasks/0.13.11/jars/tasks.jar ...  
     [SUCCESSFUL ] org.scala-sbt#tasks;0.13.11!tasks.jar (3010ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tracking/0.13.11/jars/tracking.jar ...  
     [SUCCESSFUL ] org.scala-sbt#tracking;0.13.11!tracking.jar (2193ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/testing/0.13.11/jars/testing.jar ...  
     [SUCCESSFUL ] org.scala-sbt#testing;0.13.11!testing.jar (3076ms)  
 downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.6/scala-compiler-2.10.6.jar ...  
     [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.6!scala-compiler.jar (100258ms)  
 downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.10.6/scala-reflect-2.10.6.jar ...  
     [SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.6!scala-reflect.jar (10966ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.13.11/jars/control.jar ...  
     [SUCCESSFUL ] org.scala-sbt#control;0.13.11!control.jar (2203ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.11/jars/collections.jar ...  
     [SUCCESSFUL ] org.scala-sbt#collections;0.13.11!collections.jar (4384ms)  
 downloading https://repo1.maven.org/maven2/jline/jline/2.13/jline-2.13.jar ...  
     [SUCCESSFUL ] jline#jline;2.13!jline.jar (1690ms)  
 downloading https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar ...  
     [SUCCESSFUL ] org.fusesource.jansi#jansi;1.11!jansi.jar (1058ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classfile/0.13.11/jars/classfile.jar ...  
     [SUCCESSFUL ] org.scala-sbt#classfile;0.13.11!classfile.jar (2419ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.11/jars/incremental-compiler.jar ...  
     [SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.11!incremental-compiler.jar (4280ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.11/jars/compile.jar ...  
     [SUCCESSFUL ] org.scala-sbt#compile;0.13.11!compile.jar (3685ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/persist/0.13.11/jars/persist.jar ...  
     [SUCCESSFUL ] org.scala-sbt#persist;0.13.11!persist.jar (2781ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbinary/sbinary_2.10/0.4.2/jars/sbinary_2.10.jar ...  
     [SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (2939ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cross/0.13.11/jars/cross.jar ...  
     [SUCCESSFUL ] org.scala-sbt#cross;0.13.11!cross.jar (2050ms)  
 downloading https://repo1.maven.org/maven2/org/scala-sbt/ivy/ivy/2.3.0-sbt-2cc8d2761242b072cedb0a04cb39435c4fa24f9a/ivy-2.3.0-sbt-2cc8d2761242b072cedb0a04cb39435c4fa24f9a.jar ...  
     [SUCCESSFUL ] org.scala-sbt.ivy#ivy;2.3.0-sbt-2cc8d2761242b072cedb0a04cb39435c4fa24f9a!ivy.jar (5077ms)  
 downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.46/jsch-0.1.46.jar ...  
     [SUCCESSFUL ] com.jcraft#jsch;0.1.46!jsch.jar (1399ms)  
 downloading https://repo1.maven.org/maven2/org/scala-sbt/serialization_2.10/0.1.2/serialization_2.10-0.1.2.jar ...  
     [SUCCESSFUL ] org.scala-sbt#serialization_2.10;0.1.2!serialization_2.10.jar (2002ms)  
 downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-pickling_2.10/0.10.1/scala-pickling_2.10-0.10.1.jar ...  
     [SUCCESSFUL ] org.scala-lang.modules#scala-pickling_2.10;0.10.1!scala-pickling_2.10.jar (2997ms)  
 downloading https://repo1.maven.org/maven2/org/json4s/json4s-core_2.10/3.2.10/json4s-core_2.10-3.2.10.jar ...  
     [SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (2953ms)  
 downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.6.0/jawn-parser_2.10-0.6.0.jar ...  
     [SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (699ms)  
 downloading https://repo1.maven.org/maven2/org/spire-math/json4s-support_2.10/0.6.0/json4s-support_2.10-0.6.0.jar ...  
     [SUCCESSFUL ] org.spire-math#json4s-support_2.10;0.6.0!json4s-support_2.10.jar (122ms)  
 downloading https://repo1.maven.org/maven2/org/scalamacros/quasiquotes_2.10/2.0.1/quasiquotes_2.10-2.0.1.jar ...  
     [SUCCESSFUL ] org.scalamacros#quasiquotes_2.10;2.0.1!quasiquotes_2.10.jar (2490ms)  
 downloading https://repo1.maven.org/maven2/org/json4s/json4s-ast_2.10/3.2.10/json4s-ast_2.10-3.2.10.jar ...  
     [SUCCESSFUL ] org.json4s#json4s-ast_2.10;3.2.10!json4s-ast_2.10.jar (774ms)  
 downloading https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.6/paranamer-2.6.jar ...  
     [SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.6!paranamer.jar (764ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cache/0.13.11/jars/cache.jar ...  
     [SUCCESSFUL ] org.scala-sbt#cache;0.13.11!cache.jar (2837ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/test-agent/0.13.11/jars/test-agent.jar ...  
     [SUCCESSFUL ] org.scala-sbt#test-agent;0.13.11!test-agent.jar (2668ms)  
 downloading https://repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar ...  
     [SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (634ms)  
 downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.11/jars/apply-macro.jar ...  
     [SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.11!apply-macro.jar (2501ms)  
 :: retrieving :: org.scala-sbt#boot-app  
     confs: [default]  
     49 artifacts copied, 0 already retrieved (17330kB/137ms)  
 Getting Scala 2.10.6 (for sbt)...  
 downloading https://repo1.maven.org/maven2/org/scala-lang/jline/2.10.6/jline-2.10.6.jar ...  
     [SUCCESSFUL ] org.scala-lang#jline;2.10.6!jline.jar (1016ms)  
 downloading https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...  
     [SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (1034ms)  
 :: retrieving :: org.scala-sbt#boot-scala  
     confs: [default]  
     5 artifacts copied, 0 already retrieved (24494kB/62ms)  
 [info] Set current project to sbt (in build file:/D:/vesedan/sbt/)  


Start Scala console
 > console  
 [info] Updating {file:/D:/vesedan/sbt/}sbt...  
 [info] Resolving org.fusesource.jansi#jansi;1.4 ...  
 [info] Done updating.  
 [info] 'compiler-interface' not yet compiled for Scala 2.10.6. Compiling...  
 [info]  Compilation completed in 16.541 s  
 [info] Starting scala interpreter...  
 [info]  
 Welcome to Scala version 2.10.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_74).  
 Type in expressions to have them evaluated.  
 Type :help for more information.  
 scala>  
 scala>  
 scala> println("Hi!")  
 Hi!
 scala>  

Download  Scala IDE
 http://scala-ide.org/download/sdk.html

No comments:

Post a Comment