本文介绍了来自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/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文件依赖项
发布评论