我使用ScalaVersion2.10和SBT版本0.13.8。在Intellij项目中,我需要编译一个依赖于外部jars的程序。我以以下格式添加了libraryDependencies和resolvers
name := "test"
version := "1.0"
scalaVersion := "2.12.1"
resolvers += "Local IE Libraries" at "E/Temp/IE"
libraryDependencies ++= Seq(
"org.gigaspaces.insightedge" % "insightedge-core" % "1.0.0")我犯了个错误
[error] (*:update) sbt.ResolveException: unresolved dependency: org.gigaspaces.insightedge#insightedge-core;1.0.0: Local InsightEdge Libraries: unable to get resource for org/gigaspaces/insightedge#insightedge-core;1.0.0: res=E/Temp/IE/org
e/insightedge-core/1.0.0/insightedge-core-1.0.0.pom: java.net.MalformedURLException: no protocol: E/Temp/IE/org/gigaspaces/insightedge/insightedge-core/1.0.0/insightedge-core-1.0.0.pom更新
如果我将具有file://前缀的解析器路径指定为
resolvers += "Local InsightEdge Libraries" at "file://E/Temp/IE"我得到了一个不同的错误
[error] (*:update) sbt.ResolveException: unresolved dependency: org.gigaspaces.insightedge#insightedge-core;1.0.0: URI has an authority component这个问题是由于窗口路径造成的吗?
谢谢
发布于 2017-01-25 15:21:36
问题是这条线
resolvers += "Local IE Libraries" at "E/Temp/IE"在MalformedURLException抱怨的URL中,结果是
E/Temp/IE/org/gigaspaces/insightedge/insightedge-core/1.0.0/insightedge-core-1.0.0.pom更具体地说,例外说的是“没有协议”。因此,如果这是一个本地存储库,您可能需要添加一个"file://“”。不确定相对路径是否有效,但提供绝对路径应该有效:
file://absolute/path/to/the/directory/against/which/to/resolve这个维基百科页面可能会帮助您了解如何在您的风云系统上指定路径:scheme#Windows。
https://stackoverflow.com/questions/41853849
复制相似问题