exclude JUnit from Scala dependencies

This commit is contained in:
Mark Harrah 2011-06-11 20:09:15 -04:00
parent 997a501771
commit fdbeb7742b
3 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,8 @@ private object BootConfiguration
val CompilerModuleName = "scala-compiler"
val LibraryModuleName = "scala-library"
val JUnitName = "junit"
val SbtOrg = "org.scala-tools.sbt"
/** The Ivy conflict manager to use for updating.*/

View File

@ -109,6 +109,7 @@ final class Update(config: UpdateConfiguration)
case u: UpdateScala =>
addDependency(moduleID, ScalaOrg, CompilerModuleName, scalaVersion, "default;optional(default)", u.classifiers)
addDependency(moduleID, ScalaOrg, LibraryModuleName, scalaVersion, "default", u.classifiers)
excludeJUnit(moduleID)
System.out.println("Getting Scala " + scalaVersion + " " + reason + "...")
case u: UpdateApp =>
val app = u.id
@ -147,6 +148,7 @@ final class Update(config: UpdateConfiguration)
for(conf <- dep.getModuleConfigurations)
dep.addDependencyArtifact(conf, ivyArtifact)
}
private def excludeJUnit(module: DefaultModuleDescriptor): Unit = module.addExcludeRule(excludeRule(JUnitName, JUnitName))
private def excludeScala(module: DefaultModuleDescriptor)
{
def excludeScalaJar(name: String): Unit = module.addExcludeRule(excludeRule(ScalaOrg, name))

View File

@ -72,7 +72,6 @@ object Common
lazy val jsch = lib("com.jcraft" % "jsch" % "0.1.31" intransitive() )
lazy val sbinary = lib("org.scala-tools.sbinary" %% "sbinary" % "0.4.0" )
lazy val scalaCompiler = libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ )
lazy val excludeJUnit = ivyXML := <dependencies><exclude org="junit"/></dependencies>
}
object Licensed
{