sbt

Play framework: Why does https url not work on using “sbt dist” command?

末鹿安然 提交于 2020-04-16 04:26:21
问题 I am trying to create executable file for deploying my web app using play framework sbt dist command. When I run my application using "sbt run" command then https work but when I use sbt dist and run my executable file to start my app then only http url works. Following is my configuration In build.sbt javaOptions ++= Seq( "-Dhttps.keyStore=conf/keystore.jks", "-Dhttps.keyStorePassword=*****", "-Dhttp.port=9000", "-Dhttps.port=9001", "-Dsentry.dsn=https://****" ) In application.conf play.http

Scala构建工具(SBT)教程

假装没事ソ 提交于 2020-04-15 18:13:34
【推荐阅读】微服务还能火多久?>>> 我们使用 sbt 创建、测试、运行和提交作业。该教程会解释你在我们的课程中将会用到的所有 sbt 命令。 工具安装 页说明了如何安装 sbt。 启动 sbt 要启动 sbt,打开一个终端(Windows 中的”命令提示符“)并切换到你正在解决的作业所在目录。输入 sbt 将会打开 sbt 命令提示符。 #这是 sbt 的壳 运行 Scala 解释器 你可以使用 console 任务在 sbt 内启动 Scala 解释器。解释器(也叫做 REPL,代表”读算印复 (Read Eval Print Loop“)对于试验 Scala 代码小片段很有用。注意,只有当你的代码没有编译错误时,解释器才能启动。 要退出解释器并返回 sbt,输入 ctrl-d 。 > console[info] 正在启动 Scala 解释器... 欢迎来带 Scala 版本 2.10.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_04-ea). 输入表达式得到运算值。 输入 :help 获取更多信息。 scala> println("Oh, hai!") # 这是Scala解释器,输入一些代码 Oh, hai! scala> val l = List(1, 2, 3) l: List[Int] = List(1, 2, 3)

sbt.TrapExitSecurityException thrown at “sbt run”

五迷三道 提交于 2020-04-08 08:59:06
问题 I've created a simple Scala console application. I run it by sbt run and always receive the following exception on exit: Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0" [success] Total time: 17 s, completed 30.01.2014 22:19:37 After that all my console output becomes invisible. I can type and run applications but I cannot see what I'm typing. What does this exception means? What am I doing wrong? 回答1: // build.sbt trapExit := false

Add tools.jar in the classpath of sbt project

拟墨画扇 提交于 2020-04-08 00:51:12
问题 The ':javap' command in the scala 2.9.1 console need the tools.jar (from JDK6) in the 'classpath'. From cmd-line it could be done with '-cp' argument or CLASSPATH environment variable. How to do the same for scala console that invoked from SBT with the 'console' and 'console-quick' commands? 回答1: Long answer, that might help you elsewhere. If I want to know about something in SBT, I inspect it: > inspect console [info] Task: Unit [info] Description: [info] Starts the Scala interpreter with

Add tools.jar in the classpath of sbt project

怎甘沉沦 提交于 2020-04-08 00:50:35
问题 The ':javap' command in the scala 2.9.1 console need the tools.jar (from JDK6) in the 'classpath'. From cmd-line it could be done with '-cp' argument or CLASSPATH environment variable. How to do the same for scala console that invoked from SBT with the 'console' and 'console-quick' commands? 回答1: Long answer, that might help you elsewhere. If I want to know about something in SBT, I inspect it: > inspect console [info] Task: Unit [info] Description: [info] Starts the Scala interpreter with

Use sbt shell for build and import

梦想的初衷 提交于 2020-04-06 02:39:13
问题 There is this option in IntelliJ. What does it do? When should we enable it and when not? [ ] Use sbt shell for build and import (requires sbt 0.13.5+) 回答1: From the youtrack issue: Currently in sbt projects, project settings are imported, but compiling is done via the compiler providede by the Scala plugin. In some sbt configurations that don't map well to the IDEA project model, this will result in errors, forcing users to use the shell in addition to the IDE. For a better integration, we

Is “they use sbt, an IDE, and other tools as their interface to the compiler” contrary to “therefore they may not even have scalac installed”?

南笙酒味 提交于 2020-03-21 10:56:05
问题 https://docs.scala-lang.org/overviews/compiler-options/index.html says Scala compiler scalac offers various compiler options, also referred to as compiler flags, to change how to compile your program. Nowadays, most people are not running scalac from the command line. Instead, they use sbt, an IDE, and other tools as their interface to the compiler. Therefore they may not even have scalac installed, and won’t think to do man scalac . Does "the compiler" refer to scalac ? If yes, is "they use

linux使用

*爱你&永不变心* 提交于 2020-03-16 02:42:47
1.文件命令 1.1创建文件 touch 文件名称 例如:touch abc //表示在当前目录下创建abc文件 1.2打开文件 vim 文件名 或者 vi 文件名 1.3查询文件 ls -l 1.4.查找文件的位置 在终端输入:locate 文件名 比如hadoop文件 1.5下载文件到指定目录 wget -P 指定目录 下载地址 如果下载到当前目录下 不用 -P 参数 例如:下载地址:https: // repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.11/sbt-launch.jar 下载到/usr/local/sbt目录中 wget -P /usr/local/sbt https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.11/sbt-launch.jar 2.文件 夹 命令 2.1创建文件夹 mkdir 文件夹名称 例如:mkdir abc //表示在当前目录下创建abc文件夹 2.2删除文件夹 sudo rm -rf 文件夹名称 删除前当前目录含test.scala文件夹: 执行rm -rf test.scala命令 删除后当前目录不含test.scala文件夹: 3.目录命令

Spark 源码和应用开发环境的构建

﹥>﹥吖頭↗ 提交于 2020-03-04 16:51:27
引言 Spark 现在无疑是大数据领域最热门的技术之一,读者很容易搜索到介绍如何应用 Spark 技术的文章,但是作为开发人员,在了解了应用的概念之后,更习惯的是打开开发环境,开发一些应用来更深入的学习 spark 知识,在遇到问题的时候,也希望能够深入调试 Spark 源代码来解决问题。但是由于 Spark 技术本身较新,对于初学者,在构建开发调试环境的过程中,总会遇到这样那样的问题。而其使用的 Scala 语言,SBT 构建工具相对于 Java 语言,Maven 构建工具而言,也比较小众,因些在 Web 上能够参考的信息相对也比较少。本文结合作者的实践,从 Spark 的源码开始编译整个项目,同时给出了一些在编译过程中可能出现的问题,供使用参考。文中各步骤展示的编译方法主要用于方便学习 Spark 源码,若仅需要编写 Spark 应用则不需要如此繁复的流程,具体引用方法可参考最后一章。 环境要求 系统:Windows/Linux/Mac OS IDE:Eclipse/IntelliJ 其他依赖:Scala,Sbt,Maven Eclipse 下开发调试环境的配置 该小节中使用的各项工具分别为:Windows 7+Eclipse Java EE 4.4.2+Scala 2.10.4+Sbt 0.13.8+Maven3.3.3,测试的 Spark 版本为 1.4.0。 1.配置

How can I apply setting changes on onLoad hook in SBT?

左心房为你撑大大i 提交于 2020-03-02 04:39:26
问题 I have some settings in SBT that I need to generate values from after a loaded plugin has performed some side-effects. The onLoad hooks seem the best place to do that. The hook receives a State , transforms it and returns a new one. It's easy to schedule commands with State methods, but changing settings doesn't seem very easy. I first tried the following code, which fails because it seems to cause a recursive call to onLoad and a failure due to a duplicate actor name (probably a product of