Add failing test for ivy/maven cross-over configuration issue.

This commit is contained in:
Josh Suereth 2014-09-09 11:04:20 -04:00
parent 9a60ca7da9
commit 7157af57cf
4 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,15 @@
val repoFile = file("mvn-repo")
resolvers += "bad-mvn-repo" at repoFile.toURI.toURL.toString
libraryDependencies += "bad" % "mvn" % "1.0"
TaskKey[Unit]("check") := {
val cp = (fullClasspath in Compile).value
def isTestJar(n: String): Boolean =
(n contains "scalacheck") ||
(n contains "specs2")
val testLibs = cp map (_.data.getName) filter isTestJar
assert(testLibs.isEmpty, s"Compile Classpath has test libs:\n * ${testLibs.mkString("\n * ")}")
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>bad</groupId>
<artifactId>mvn</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.scala-sbt</groupId>
<artifactId>completion</artifactId>
<version>0.13.5</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1 @@
> check