sbt

Should I include scala-compiler as a dependency in build.sbt?

大城市里の小女人 提交于 2020-02-03 07:48:09
问题 I'm trying to build a project with scala 2.11.7 in intellij. I've set the scalaVersion to 2.11.7 , but when I check the external libraries, I can see scala-compiler:2.11.0 . Do I need to declare scala-compiler:2.11.7 as a dependency in build.sbt ? The docs are confusing, seemingly saying that I do need to and then not to in consecutive paragraphs: When using a Scala dependency other than the standard library, add it as a normal managed dependency. For example, to depend on the Scala compiler,

Propagating exit code from exec'd batch file back to ant

99封情书 提交于 2020-02-02 03:05:10
问题 I need to call sbt from ant. I'm doing this with the "exec" task as follows: <target name="publish-jar"> <exec executable="sbt.bat" failonerror="true"> <arg value="publish"/> </exec> </target> I need the ant task to "fail" if the sbt task fails, which is why failonerror="true" is being used. However, this does not work. When the sbt task fails, ant does not report a failed build. This looks like the problem discussed here: Ant exec resultproperty is not working. The suggested workaround is to

Can ScalaTest generate a single HTML report for all subprojects?

ぐ巨炮叔叔 提交于 2020-01-31 13:28:11
问题 I am trying to use ScalaTest (with Scala 2.11.0 and SBT 0.13.x) to generate a single HTML report for a project with many sub projects. To do this, I put the following line in my build.sbt: testOptions in ThisBuild += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/test-reports") And I have included the pegdown library that is needed for this facility... libraryDependencies in ThisBuild ++= Seq( "org.scalatest" %% "scalatest" % "2.1.7" % "test", "org.pegdown" % "pegdown" % "1.4.2" %

Can ScalaTest generate a single HTML report for all subprojects?

柔情痞子 提交于 2020-01-31 13:24:58
问题 I am trying to use ScalaTest (with Scala 2.11.0 and SBT 0.13.x) to generate a single HTML report for a project with many sub projects. To do this, I put the following line in my build.sbt: testOptions in ThisBuild += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/test-reports") And I have included the pegdown library that is needed for this facility... libraryDependencies in ThisBuild ++= Seq( "org.scalatest" %% "scalatest" % "2.1.7" % "test", "org.pegdown" % "pegdown" % "1.4.2" %

What's the relationship of the versions of scala when I use sbt to build a scala project?

a 夏天 提交于 2020-01-28 05:22:32
问题 I'm building a scala project(writen in scala 2.11) with SBT 1.x.There are a few "versions of scala" which made me puzzle. SBT 1.x => scala 2.12 SBT plugin => scala 2.x My project => scala 2.11 Please help me to figure out what's the difference or relationship between them.And how SBT tells them apart when compiling or running the project? 回答1: The Scala version used by sbt itself and its plugins is completely independent from the Scala version used to compile the code in your project. The sbt

What's the relationship of the versions of scala when I use sbt to build a scala project?

只谈情不闲聊 提交于 2020-01-28 05:21:28
问题 I'm building a scala project(writen in scala 2.11) with SBT 1.x.There are a few "versions of scala" which made me puzzle. SBT 1.x => scala 2.12 SBT plugin => scala 2.x My project => scala 2.11 Please help me to figure out what's the difference or relationship between them.And how SBT tells them apart when compiling or running the project? 回答1: The Scala version used by sbt itself and its plugins is completely independent from the Scala version used to compile the code in your project. The sbt

PlayFramework resolves dependencies every launch

南楼画角 提交于 2020-01-25 04:30:27
问题 Every time I launch my app play resolves dependencies. Considering this happens every single launch takes a lot of time... There was a time I had problem with one lib that wasn't unavailable so the app didn't launch... Is there anyway to configure play/SBT to work like Maven? Download dependencies and use local instead resolve every launch? 回答1: Yes, you can do this. Add skip in update := true in to the build.sbt file to stop dependencies resolution. My build.sbt looks like ... scalaVersion :

HBase dependencies with SBT in Scala

柔情痞子 提交于 2020-01-24 19:57:04
问题 I am new with Scala, SBT and Intellij. Using the following sbt file : name := "mycompany" version := "0.0.1-SNAPSHOT" scalaVersion := "2.11.8" libraryDependencies ++= Seq( "org.apache.spark" %% "spark-core" % "2.0.1", "org.apache.spark" %% "spark-sql" % "2.0.1", "org.apache.spark" %% "spark-mllib" % "2.0.1", "org.apache.hbase" % "hbase-client" % "1.2.0", "com.typesafe.akka" %% "akka-http-experimental" % "2.4.11" ) resolvers ++= Seq( "Apache Repository" at "https://repository.apache.org

How to get sbt-assembly merge right?

旧街凉风 提交于 2020-01-24 09:39:33
问题 In our Scala/Scalatra project, we have this merge policy for the plugin sbt-assembly : assemblyMergeStrategy in assembly := { case x => val oldStrategy = (assemblyMergeStrategy in assembly).value oldStrategy(x) } [error] 11 errors were encountered during merge java.lang.RuntimeException: deduplicate: different file contents found in the following: ~/.ivy2/cache/org.scalatra/scalatra_2.11/jars/scalatra_2.11-2.3.1.jar:mime.types ~/.ivy2/cache/com.amazonaws/aws-java-sdk-s3/jars/aws-java-sdk-s3-1

Unable to run Unit tests (scalatest) on Spark-2.2.0 - Scala-2.11.8

不打扰是莪最后的温柔 提交于 2020-01-24 00:51:14
问题 Unable to run run scalatest with context on spark-2.2.0 StackTrace: An exception or error caused a run to abort: org.apache.spark.sql.test.SharedSQLContext.eventually(Lorg/scalatest/concurrent/PatienceConfiguration$Timeout;Lscala/Function0;Lorg/scalatest/concurrent/AbstractPatienceConfiguration$PatienceConfig;)Ljava/lang/Object; java.lang.NoSuchMethodError: org.apache.spark.sql.test.SharedSQLContext.eventually(Lorg/scalatest/concurrent/PatienceConfiguration$Timeout;Lscala/Function0;Lorg