mirror of https://github.com/sbt/sbt.git
Merge pull request #612 from coursier/topic/test-jar
Don't require adding type test-jar to classpathTypes
This commit is contained in:
commit
4fbb2f1992
|
|
@ -175,7 +175,10 @@ object CoursierPlugin extends AutoPlugin {
|
||||||
)
|
)
|
||||||
|
|
||||||
confs ++ extraSources.toSeq ++ extraDocs.toSeq
|
confs ++ extraSources.toSeq ++ extraDocs.toSeq
|
||||||
}
|
},
|
||||||
|
// Tests artifacts from Maven repositories are given this type.
|
||||||
|
// Adding it here so that these work straightaway.
|
||||||
|
classpathTypes += "test-jar"
|
||||||
)
|
)
|
||||||
|
|
||||||
override lazy val buildSettings = super.buildSettings ++ Seq(
|
override lazy val buildSettings = super.buildSettings ++ Seq(
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
scalaVersion := "2.11.8"
|
||||||
|
libraryDependencies += "org.jclouds.api" % "nova" % "1.5.9" classifier "tests"
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
val pluginVersion = sys.props.getOrElse(
|
||||||
|
"plugin.version",
|
||||||
|
throw new RuntimeException(
|
||||||
|
"""|The system property 'plugin.version' is not defined.
|
||||||
|
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
addSbtPlugin("io.get-coursier" % "sbt-coursier" % pluginVersion)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
import java.io.File
|
||||||
|
import java.nio.file.Files
|
||||||
|
|
||||||
|
import scala.util.Try
|
||||||
|
|
||||||
|
object Main extends App {
|
||||||
|
|
||||||
|
def classFound(clsName: String) = Try(
|
||||||
|
Thread.currentThread()
|
||||||
|
.getContextClassLoader()
|
||||||
|
.loadClass(clsName)
|
||||||
|
).toOption.nonEmpty
|
||||||
|
|
||||||
|
val classifierTest = classFound("org.jclouds.openstack.nova.functions.ParseServerFromJsonResponseTest")
|
||||||
|
|
||||||
|
assert(classifierTest, s"Couldn't find classifierTest")
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
> run
|
||||||
Loading…
Reference in New Issue