来自github存储库的Scala sbt文件依赖项

编程入门 行业动态 更新时间:2024-10-27 12:23:47
本文介绍了来自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文件依赖项

本文发布于:2023-07-24 13:15:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1203664.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   github   Scala   sbt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!