Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define maven test-jar dependency in sbt

Tags:

scala

sbt

I have the following maven dependency

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

I know how to specify groupId,artifactId, version and scope

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

but how do I specify the type (test-jar) so that I'd get hbase-0.90.4-tests.jar from the repo?

like image 335
Arnon Rotem-Gal-Oz Avatar asked Nov 10 '11 05:11

Arnon Rotem-Gal-Oz


People also ask

Which is the correct way to add dependencies in SBT file?

If you have JAR files (unmanaged dependencies) that you want to use in your project, simply copy them to the lib folder in the root directory of your SBT project, and SBT will find them automatically.

Where are dependencies downloaded in SBT?

All new SBT versions (after 0.7. x ) by default put the downloaded JARS into the . ivy2 directory in your home directory. If you are using Linux, this is usually /home/<username>/.

What is provided dependency in SBT?

The “provided” keyword indicates that the dependency is provided by the runtime, so there's no need to include it in the JAR file. When using sbt-assembly, we may encounter an error caused by the default deduplicate merge strategy. In most cases, this is caused by files in the META-INF directory.


1 Answers

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

like image 114
alno Avatar answered Sep 22 '22 07:09

alno