问题
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.
回答1:
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)
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.
来源:https://stackoverflow.com/questions/42206668/scala-sbt-file-dependency-from-github-repository