Simple way to add jar URL as dependency in sbt

前端 未结 1 741
旧时难觅i
旧时难觅i 2021-02-13 06:11

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?

1条回答
  •  爱一瞬间的悲伤
    2021-02-13 06:57

    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"
    

    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

    0 讨论(0)
提交回复
热议问题