如何声明仅在测试中使用的依赖项,即已部署的工件不需要它们?
maven中的等效项是<scope>test</scope>
:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
sbt中的等效项是% "test"
:
libraryDependencies += "org.apache.derby" % "derby" % "10.4.1.3" % "test"
将其添加到:dev
配置文件: