如何在 SBT 中刷新更新的 Git 依赖项? [英] How do I refresh updated Git dependency artifacts in SBT?

查看:32
本文介绍了如何在 SBT 中刷新更新的 Git 依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我在 这个问题在这里.

它工作正常,只是我似乎无法在更新时让 SBT 重新编译我的 Git 依赖项.换句话说:如果我更新依赖项,推送到 Git 并重新加载我项目的 SBT 并运行 package,那么 SBT 在编译我的项目时不会重新编译外部 Git 依赖项.

It works fine except that I can't seem to get SBT to re-compile my Git dependency when it gets updated. In other words: if I make an update to the dependency, push to Git and reload my project's SBT and run package, then SBT does not recompile the external Git dependency when compiling my project.

我已经尝试在我的 Git 依赖项中创建一个新分支(例如,forcenew)并更新我的 SBT 项目配置中的分支以使用它:

I've tried creating a new branch in my Git dependency (say, forcenew) and updating the branch in my SBT project configuration to use this:

lazy val depProject = RootProject(uri("git://github.com/me/dep-project.git#forcenew"))

但即使这样也不会强制刷新.我有点困惑 - 我什至找不到 SBT 将 Git 项目放在何处来编译它(它似乎不在 ~/.sbt/~/.ivy2/)...

But even this doesn't force a refresh. I'm a bit stumped - I can't even find where SBT puts the Git project to compile it (it doesn't seem to be in ~/.sbt/ or ~/.ivy2/)...

非常感谢任何帮助!

推荐答案

来自:https://github.com/sbt/sbt/issues/335

这应该在 0.12.0 中修复,只需调用sbt update"

this should be fixed in 0.12.0, just call "sbt update"

它在 0.12.0 中修复了所以 sbt update 就足够了,但在 13.0 中又回来了 -- 目前,您必须手动从 ~/.sbt/staging/ 中清除依赖

It was fixed in 0.12.0 so sbt update is enough, but got back in 13.0 -- for now, you have to wipe dependency from ~/.sbt/staging/ manually

这篇关于如何在 SBT 中刷新更新的 Git 依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆