来自github存储库的Scala sbt文件依赖项 [英] Scala sbt file dependency from github repository
本文介绍了来自github存储库的Scala sbt文件依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以包含来自github的依赖项?该存储库没有一个jar文件,只有一个build.sbt文件和一个源文件夹.
Is it possible to include a dependency from github? The repository does not have a jar file, just a build.sbt file and a source folder.
推荐答案
您可以在 build.sbt
中创建一个指向源的新项目,然后使用 dependsOn
:
You can create a new project which points to the source in your build.sbt
and then use dependsOn
:
lazy val projectIDependOn = RootProject(uri("git://github.com/user/Project.git"))
lazy val myProject = project in file("my-project").dependsOn(projectIDependOn)
另一种方法是克隆到github存储库,然后使用 sbt-assembly 进行创建可以使用的超级JAR,但这需要做更多的工作.
An alternative approach would be to clone to github repository and then use sbt-assembly to create an uber JAR you can use, but that requires a bit more work.
这篇关于来自github存储库的Scala sbt文件依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文