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.
This commit is contained in:
Mark Harrah 2013-06-03 22:49:48 -04:00
parent cbe6c96564
commit e83038bed4
1 changed files with 2 additions and 3 deletions

View File

@ -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"),