sbt

UNRESOLVED DEPENDENCIES error while trying to create jar

空扰寡人 提交于 2019-12-20 10:25:27
问题 I'm trying to build a Scala jar file to run it in spark. I'm following this tutorial. when trying to build jar file using sbt as here, i'm facing with following error [info] Resolving org.apache.spark#spark-core_2.10.4;1.0.2 ... [warn] module not found: org.apache.spark#spark-core_2.10.4;1.0.2 [warn] ==== local: tried [warn] /home/hduser/.ivy2/local/org.apache.spark/spark-core_2.10.4/1.0.2/ivys/ivy.xml [warn] ==== Akka Repository: tried [warn] http://repo.akka.io/releases/org/apache/spark

What is the difference of running `scala` and `sbt console`?

↘锁芯ラ 提交于 2019-12-20 10:23:15
问题 What is the difference of running the scala shell in these different ways? 回答1: SBT is tied to a specific project defined by a build.sbt file in a way that $ sbt console will load up the same REPL environment as $ scala but with the addition of all of the project code and dependencies defined in the build available for import. Also, it will use the version of Scala defined by build.sbt . For example: $ scala scala> import scalaz._ <console>:7: error: not found: value scalaz import scalaz._

How to disable “Slow” tagged Scalatests by default, allow execution with option?

帅比萌擦擦* 提交于 2019-12-20 09:59:17
问题 I want to disable certain automated tests tagged as "Slow" by default but allow the user to enable their execution with a simple command line. I imagine this is a very common use case. Given this test suite: import org.scalatest.FunSuite import org.scalatest.tagobjects.Slow class DemoTestSuite extends FunSuite { test("demo test tagged as slow", Slow) { assert(1 + 1 === 2) } test("demo untagged test") { assert(1 + 1 === 2) } } By default, sbt test will run both tagged and untagged tests. If I

How to link classes from JDK into scaladoc-generated doc?

偶尔善良 提交于 2019-12-20 09:53:09
问题 I'm trying to link classes from the JDK into the scaladoc-generated doc. I've used the -doc-external-doc option of scaladoc 2.10.1 but without success. I'm using -doc-external-doc:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar#http://docs.oracle.com/javase/7/docs/api/ , but I get links such as index.html#java.io.File instead of index.html?java/io/File.html . Seems like this option only works for scaladoc-generated doc. Did I miss an option in scaladoc or should I fill a feature request? I

Why does sbt compile fail with StackOverflowError?

大憨熊 提交于 2019-12-20 09:44:15
问题 I am working on a Scala project that has been in existence for a few years but is new to me. My task is to upgrade it from Scala 2.9.3 to 2.11.7, along with its dependencies. I have gotten past the errors and warnings, but I cannot get the project to compile successfully in SBT. I always get a StackOverflowError in pretty much the same place. The stacktrace looks like this, but details vary with the Xss setting (currently 4M, but have tried as high as 24M): java.lang.StackOverflowError at

Is the use of 'aggregate' following by 'dependsOn' redundant with the same modules?

微笑、不失礼 提交于 2019-12-20 09:37:18
问题 In SBT is the use of aggregate following dependsOn redundant if they both contain the same sub-modules? According to the documentation it seems so, but I have seen this behavior used before and I don't understand what the benefit is. If a project is defined with dependencies, doesn't that already imply what aggregate does for those same dependencies? I notice that my project build is much slower with the use of this redundant aggregate than without and I'd like to know if I can safely remove

How to use sbt with Google App Engine?

冷暖自知 提交于 2019-12-20 08:43:42
问题 Has anybody tried to setup sbt to work with Google App Engine? I dream about using development server auto-reloading after source changes. 回答1: For a quick demo you can clone or download what I have done here. A minimalistic sbt-appengine-plugin example from scratch Clone the sbt-appengine-plugin from GitHub cd mystuff git clone git://github.com/Yasushi/sbt-appengine-plugin.git cd sbt-appengine-plugin sbt Publish the plugin locally so that you can use it in your own projects publish-local

How can I get complete stacktraces for exceptions thrown in tests when using sbt and testng?

佐手、 提交于 2019-12-20 08:35:04
问题 The stacktraces are truncated - e.g. they end with [info] ... Using last or changing traceLevel doesn't help - it simply prints the complete stacktrace of the sbt wrapper. This is testing with testng (also I believe using scalatest and sl4j) 回答1: Using hints found in the documentation here: (quoted) You can configure the output shown when running with sbt in four ways: 1) turn off color, 2) show short stack traces, 3) full stack traces, and 4) show durations for everything. To do so you must

How to manage multiple interdependent modules with SBT and IntelliJ IDEA?

岁酱吖の 提交于 2019-12-20 08:13:03
问题 I'm developing several modules with dependencies among them, and would like to work with them all together in one IDEA project. I'm using sbt-idea to generate IDEA projects from the sbt build definitions, which works great for individual projects. In the multiple-module case, however, the things I've tried so far don't quite work: Use sbt-idea to generate an IDEA .iml file for each module independently ; then create a master IDEA project from scratch an add those modules to it. This makes the

How to manage multiple interdependent modules with SBT and IntelliJ IDEA?

戏子无情 提交于 2019-12-20 08:12:11
问题 I'm developing several modules with dependencies among them, and would like to work with them all together in one IDEA project. I'm using sbt-idea to generate IDEA projects from the sbt build definitions, which works great for individual projects. In the multiple-module case, however, the things I've tried so far don't quite work: Use sbt-idea to generate an IDEA .iml file for each module independently ; then create a master IDEA project from scratch an add those modules to it. This makes the