2011-11-10 20 views
30

行家測試-JAR依賴我有以下Maven依賴如何界定SBT

<dependency> 
     <groupId>org.apache.hbase</groupId> 
     <artifactId>hbase</artifactId> 
     <version>0.90.4</version> 
     <type>test-jar</type> 
     <scope>test</scope> 
    </dependency> 

我知道如何指定的groupId,artifactId的,版本和範圍

"org.apache.hbase" % "hbase" % "0.90.4" % "test" 

但我怎麼指定類型(test-jar),這樣我就可以從repo獲取hbase-0.90.4-tests.jar了?

回答

44

"org.apache.hbase" % "hbase" % "0.90.4" % "test" classifier "tests"

+1

令人困惑的是,maven中的「類型」轉化爲sbt中的分類器。因爲,除了「類型」,maven還有「分類器」。不知道,maven中的分類器在sbt中轉化爲什麼? – smartnut007