首页 > 解决方案 > 除了 Github 之外的另一个 Git Repo(前提是 Bitbucket)是否不适用于“sbt new OtherGitRepo”

问题描述

我想让我们sbt new ..Giter8模板创建一个新项目。

该模板托管在私有Bitbucket Git Repo中。

它适用于普通的 Giter8

g8 https://mycompany.ch/stash/bpf-package-template.g8.git

但它不适用于sbt

sbt new https://mycompany.ch/stash/bpf-package-template.g8.git

我没有在sbt 文档上找到一个例子或一个声明,这是不可能的。

这是控制台输出:

mpa$ sbt new https://mycompany.ch/stash/bpf-package-template.g8.git
[info] Loading settings from metals.sbt ...
[info] Loading global plugins from /Users/mpa/.sbt/1.0/plugins
[info] Set current project to my-packages (in build file:/Users/mpa/dev/my-packages/)
[info] Set current project to my-packages (in build file:/Users/mpa/dev/my-packages/)
Template not found for: https://mycompany.ch/stash/bpf-package-template.g8.git

更新:我创建了这个问题:https ://discuss.lightbend.com

标签: gitscalasbtbitbucket

解决方案


它在某种程度上没有达到Giter8TemplateResolverfor sbt new https://mycompany.ch/stash/bpf-package-template.g8.git,但我认为你的期望是正确的,它应该可以工作。

如果您可以帮助调试,方法就在isDefined这里- https://github.com/sbt/sbt-giter8-resolver/blob/master/src/main/scala/sbt/Giter8TemplateResolver.scalaGiter8TemplateResolver


推荐阅读