From e83038bed416b9757979b7f9096e4b54b0040aee Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Mon, 3 Jun 2013 22:49:48 -0400 Subject: [PATCH] Fix issue with JLine dependency. The reported issue was a JLine class not being found on sbt startup. JLine was depended on in the sbt build in two places, one with an extra attribute (component) and one without. The retrieve pattern used by the launcher includes that extra attribute. Previously, the dependency without the attribute was selected and jline properly ended up on the sbt classpath. Now, either by bumping JLine to 2.11 or some other insignificant change, jline ends up in a subdirectory for the component and doesn't get on the classpath. (The move in 0.10 away from retrieving based on patterns and using things directly from the cache was good, but this can't be used in the launcher until a hash-based artifact is used so that sbt+Scala jars aren't deleted or overwritten while sbt runs.) A secondary issue was that the compiler-interface-src artifact didn't have a configuration and was therefore not included in the published artifacts. --- project/Sbt.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/project/Sbt.scala b/project/Sbt.scala index 098506b01..7921f7ffa 100644 --- a/project/Sbt.scala +++ b/project/Sbt.scala @@ -247,13 +247,12 @@ object Sbt extends Build conflictWarning ~= { _.copy(filter = const(false)) }, exportedProducts in Compile := Nil, exportedProducts in Test := Nil, - libraryDependencies <+= scalaVersion( "org.scala-lang" % "scala-compiler" % _ % "provided"), - libraryDependencies += jlineDep artifacts(Artifact("jline", Map("e:component" -> srcID))) + libraryDependencies <+= scalaVersion( "org.scala-lang" % "scala-compiler" % _ % "provided") ) // def compileInterfaceSettings: Seq[Setting[_]] = precompiledSettings ++ Seq( exportJars := true, - artifact in (Compile, packageSrc) := Artifact(srcID) extra("e:component" -> srcID) + artifact in (Compile, packageSrc) := Artifact(srcID).copy(configurations = Compile :: Nil).extra("e:component" -> srcID) ) def compilerSettings = Seq( libraryDependencies <+= scalaVersion( "org.scala-lang" % "scala-compiler" % _ % "test"),