在sbt中添加jar URL作为依赖的简单方法 [英] Simple way to add jar URL as dependency in sbt

查看:126
本文介绍了在sbt中添加jar URL作为依赖的简单方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让sbt(0.10)在某个URL(http://foo.com/bar-1.1.jar)上声明一个jar作为库依赖关系?

Is there any way to get sbt (0.10) to declare a jar at some URL (http://foo.com/bar-1.1.jar) as a library dependency?

推荐答案

您可以为jar指定一个显式url。如果您使用基本配置,只需包含它,如下所示

You can specify an explicit url for a jar. If you use the basic configuration just include it like follows

libraryDependencies += "slinky" % "slinky" % "2.1" from "http://slinky2.googlecode.com/svn/artifacts/2.1/slinky.jar"

如在gitHub的sbt wiki中所述,url用作回退,以防通过常春藤解决工件。有关详细信息,请参阅显式URL 部分

As stated in the sbt wiki on GitHub the url is used as a fallback in case the artifact isn't resolved via ivy. For more details see paragraph Explicit URL

这篇关于在sbt中添加jar URL作为依赖的简单方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆