0

这是我在项目中使用的build.sbt

name := "FaceReg"

version := "1.0"

libraryDependencies += "org.openimaj" % "image-processing" % "1.2.1"

updateing 项目时,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

可能是什么问题?如何解决?

4

1 回答 1

4

OpenImaj 有自己的存储库,并且不会将工件发布到 maven 中心(这是 sbt 默认情况下咨询的少数存储库之一)。

添加以下内容resolversbuild.sbt正确解决依赖关系,您会没事的:

resolvers += "OpenIMAJ maven releases repository" at "http://maven.openimaj.org"

resolvers += "OpenIMAJ maven snapshots repository" at "http://snapshots.openimaj.org"

另外,请确保您仅%在工件中使用,而不是%%因为现在看起来您正在依赖特定的 Scala 版本,而这不是您想要的 OpenImaj。

于 2014-07-16T19:19:37.150 回答