以下是我在项目中使用的 build.sbt :
name := "FaceReg"
version := "1.0"
libraryDependencies += "org.openimaj" % "image-processing" % "1.2.1"
在update
项目期间,sbt报告UNRESOLVED DEPENDENCIES
:
[info] Resolving org.openimaj#image-processing;1.2.1 ...
[warn] module not found: org.openimaj#image-processing;1.2.1
[warn] ==== local: tried
[warn] /Users/jacek/.ivy2/local/org.openimaj/image-processing/1.2.1/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/openimaj/image-processing/1.2.1/image-processing-1.2.1.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.openimaj#image-processing;1.2.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.openimaj#image-processing;1.2.1: not found
可能有什么问题?怎么解决?
答案 0 :(得分:4)
OpenImaj has its own repository并且不会将工件发布到maven中心(默认情况下,这是sbt咨询的少数存储库之一)。
将以下resolvers
添加到build.sbt
以正确解析依赖关系,您将没事:
resolvers += "OpenIMAJ maven releases repository" at "http://maven.openimaj.org"
resolvers += "OpenIMAJ maven snapshots repository" at "http://snapshots.openimaj.org"
另外,请确保仅在工件中使用%
,而不是%%
,因为现在看起来您依赖于特定的Scala版本并且它不是您的想要OpenImaj。