在项目目录下的新建project/plugins.sbt,内容:
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.2")
运行sbt dependency-graph
2017年2月23日星期四
2017年2月16日星期四
sbt test ERROR SparkContext: Error initializing SparkContext.
参考http://stackoverflow.com/questions/41887273/sparkcontext-error-running-in-sbt-there-is-already-an-rpcendpoint-called-localb
sbt默认同时运行所有的test,但spark context只能有一个。
在build.sbt中增加:
parallelExecution in Test := false
解决问题。
sbt默认同时运行所有的test,但spark context只能有一个。
在build.sbt中增加:
parallelExecution in Test := false
解决问题。
sbt assembly忽略test
参考http://stackoverflow.com/questions/20131854/sbt-assembly-jar-exclusion
sbt 'set test in assembly := {}' clean assembly
sbt 'set test in assembly := {}' clean assembly
配置sbt镜像
sbt默认的镜像经常下载失败,简单查了一下设置其他镜像的方法:
修改系统环境变量:export SBT_OPTS="-Dsbt.override.build.repos=true"
vim ~/.sbt/repositories,增加:
[repositories]
local
repo2:http://repo2.maven.org/maven2/
ivy-typesafe:http://dl.bintray.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
ivy-sbt-plugin:http://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
没有深入研究,有空再系统看下。
下面的链接给了一些镜像,可以试下效果:
http://www.jianshu.com/p/c8c48b0b3866
https://gist.github.com/ysrotciv/267f05270a2cfab084c123316c0a82ee
修改系统环境变量:export SBT_OPTS="-Dsbt.override.build.repos=true"
vim ~/.sbt/repositories,增加:
[repositories]
local
repo2:http://repo2.maven.org/maven2/
ivy-typesafe:http://dl.bintray.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
ivy-sbt-plugin:http://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
没有深入研究,有空再系统看下。
下面的链接给了一些镜像,可以试下效果:
http://www.jianshu.com/p/c8c48b0b3866
https://gist.github.com/ysrotciv/267f05270a2cfab084c123316c0a82ee
订阅:
博文 (Atom)