简体   繁体   English

如何依赖Github的多模块SBT项目的子项目

[英]How to depend on a sub-project of multimodule SBT project from Github

I can add a dependency on the commons root like this: 我可以像这样添加对commons root的依赖:

lazy val commons = RootProject(uri("ssh://git@github.com:foo/commons.git"))
lazy val thisProject = project.in(file(".")).dependsOn(commons)

But what if I want to depend on a specific commons sub-project (the commons repository contains a multi-module SBT project). 但是如果我想依赖于特定的commons子项目( commons存储库包含一个多模块SBT项目)该怎么办。 Eg (in pseudo-code): 例如(伪代码):

lazy val commonDbStuff = RootProject(uri("ssh://git@github.com:foo/commons.git")).sub("commons-db") // pseudo-code
lazy val thisProject = project.in(file(".")).dependsOn(commonsDbStuff)

Is it possible? 可能吗?

lazy val commonDbStuff = 
  ProjectRef(uri("ssh://git@github.com/foo/commons.git"), "commons-db")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM