首页 > 学院 > 开发设计 > 正文

使用国内 maven 源编译 sbt

2019-11-06 09:14:22
字体:
来源:转载
供稿:网友

最近在研究一个用 Scala 编写的 Android 静态分析工具 Argus-SAF,也就是之前的 Amandroid1。这个工具使用了 sbt 来进行项目依赖管理,sbt 运行时经常需要下载大量的 jar 包,默认连接到 maven 官网,速度通常比较慢(慢的难以忍受)。还好在网上看到简书上的一篇文章, 改用国内源进行下载速度很快,这里备忘一下。

~/.sbt/ 目录下添加一个 repositories 文件,文件内容如下:

[repositories]localosc: http://maven.aliyun.com/nexus/content/groups/publictypesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnlysonatype-oss-releasesmaven-centralsonatype-oss-snapshots

这里的源使用的是阿里的 maven 源,网上有些文章里面提到使用 oschina 的源,但是 oschina 的源现在好像用不了了。

参考的文章:http://www.jianshu.com/p/bd37bb185e8b#


Wei F, Roy S, Ou X. Amandroid: A PRecise and general inter-component data flow analysis framework for security vetting of android apps[C]//Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security. ACM, 2014: 1329-1341. ↩
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表