2013-11-20 96 views
1

我是SBT的新手,並且以前沒有使用過Maven的經驗。 我正在嘗試將依賴關係JWPL添加到我的項目中。我看着their developer setup page,發現什麼人會加入到一個Maven安裝文件,下載該項目的例子:使用SBT安裝Maven庫

從鏈接:

<dependency> 
    <groupId>de.tudarmstadt.ukp.wikipedia</groupId> 
    <artifactId>de.tudarmstadt.ukp.wikipedia.api</artifactId> 
    <version>0.9.2</version> 
</dependency> 

這一點我通過像這樣build.sbt文件翻譯爲:

addSbtPlugin("de.tudarmstadt.ukp.wikipedia" % "de.tudarmstadt.ukp.wikipedia.api" % "0.9.2") 

然而,在sbt,當我運行更新,我得到:

> update 
[info] Updating {file:/home/me/scala/wikifun/}wikifun... 
[info] Resolving de.tudarmstadt.ukp.wikipedia#de.tudarmstadt.ukp.wikipedia;0.9.2 ... 
[warn] module not found: de.tudarmstadt.ukp.wikipedia#de.tudarmstadt.ukp.wikipedia;0.9.2 
[warn] ==== local: tried 
[warn] /home/me/.ivy2/local/de.tudarmstadt.ukp.wikipedia/de.tudarmstadt.ukp.wikipedia/scala_2.10/sbt_0.13/0.9.2/ivys/ivy.xml 
[warn] ==== public: tried 
[warn] http://repo1.maven.org/maven2/de/tudarmstadt/ukp/wikipedia/de.tudarmstadt.ukp.wikipedia_2.10_0.13/0.9.2/de.tudarmstadt.ukp.wikipedia-0.9.2.pom 
[info] Resolving org.fusesource.jansi#jansi;1.4 ... 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: de.tudarmstadt.ukp.wikipedia#de.tudarmstadt.ukp.wikipedia;0.9.2: not found 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] 
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. 
[warn]  de.tudarmstadt.ukp.wikipedia:de.tudarmstadt.ukp.wikipedia:0.9.2 (sbtVersion=0.13, scalaVersion=2.10) 
[warn] 
[trace] Stack trace suppressed: run last *:update for the full output. 
[error] (*:update) sbt.ResolveException: unresolved dependency: de.tudarmstadt.ukp.wikipedia#de.tudarmstadt.ukp.wikipedia;0.9.2: not found 
[error] Total time: 9 s, completed Nov 20, 2013 11:23:19 AM 

除了當前的問題,任何幫助理解在構建過程中會發生什麼,都將受到讚賞,因此我可以在未來自行解決問題。添加插件SBT

libraryDependencies += "de.tudarmstadt.ukp.wikipedia" % "de.tudarmstadt.ukp.wikipedia.api" % "0.9.2" 

你所用的方法(addSbtPlugin)是(顧名思義)(應該在插件名.bst文件反正去):

回答