2014-07-16 147 views
0

這裏是build.sbt我在項目中使用:爲什麼不能解決OpenIMAJ依賴?

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 

可能是什麼問題?如何解決它?

回答

4

OpenImaj has its own repository並且不會將工件發佈到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需要的。

+0

maven也會發生同樣的情況 – pamu

+0

@pamu爲什麼不應該這樣呢? (或者,你說什麼意思是說「相同」?) –

+0

我的意思是如果使用上面的依賴關係,maven也會失敗。 – pamu