【发布时间】:2016-12-18 20:10:42
【问题描述】:
我有一个项目依赖于:
"com.github.haifengl" % "smile-core" % "1.1.0",
"com.github.haifengl" % "smile-scala_2.11" % "1.1.0",
并且想修改 sbt 以使用来自 github 的同一项目的最新 master。
我在其他项目中也做过类似的事情:
lazy val myProject = Project("myProject", file("."))
.settings(commonSettings: _*)
.dependsOn(smileProject)
lazy val smileProject = RootProject(uri("https://github.com/haifengl/smile"))
但是,这失败了:
unresolved dependency: default#smile_2.11;0.1-SNAPSHOT: not found
这有点道理。关注this example
lazy val smileProject = ProjectRef(uri("https://github.com/haifengl/smile"), "smile-core")
我明白了:
[error] No project 'smile-core' in 'https://github.com/haifengl/smile'.
[error] Valid project IDs: smile
smile-core 似乎是正确的名称。
更新:添加 .git 扩展名
lazy val smileProject = ProjectRef(uri("https://github.com/haifengl/smile.git"), "smile-core")
也给出:
[error] No project 'smile-core' in 'https://github.com/haifengl/smile.git'.
[error] Valid project IDs: benchmark, core, data, demo, graph, interpolation, math, nlp, plot, root, scala, shell
...这似乎是一种改进
【问题讨论】:
-
看起来您在 URL 中缺少
.git扩展名:ProjectRef(uri("https://github.com/haifengl/smile.git"), "smile-core") -
没有帮助。已更新问题。
-
啊——确实有帮助。模块名称错误。