* fix naming clash between xsbt/sbt test libraries

* correct classpath for plugin projects
This commit is contained in:
Mark Harrah 2009-12-07 19:04:37 -05:00
parent 9bfc8a8f4a
commit dfdb9456f7
6 changed files with 11 additions and 7 deletions

View File

@ -50,6 +50,9 @@ class SbtProject(info: ProjectInfo) extends DefaultProject(info) with test.SbtSc
override def crossScalaVersions = Set(Version2_7_5)
//testing
val scalacheck = "org.scala-tools.testing" %% "scalacheck" % "1.6"
val ivy = "org.apache.ivy" % "ivy" % "2.0.0" intransitive()
val jsch = "com.jcraft" % "jsch" % "0.1.31" intransitive()
val jetty = "org.mortbay.jetty" % "jetty" % "6.1.14" % "optional"

View File

@ -4,6 +4,6 @@ import java.net.URL
class Plugins(info: ProjectInfo) extends PluginDefinition(info)
{
val scripted = "org.scala-tools.sbt" % "test" % "0.6.6"
val scripted = "org.scala-tools.sbt" % "scripted" % "0.6.6"
val technically = Resolver.url("technically.us", new URL("http://databinder.net/repo/"))(Resolver.ivyStylePatterns)
}

View File

@ -1,7 +1,7 @@
#Project properties
#Sat Aug 01 10:32:20 EDT 2009
project.organization=org.scala-tools.sbt
project.name=test
project.name=scripted
sbt.version=0.5.6
project.version=0.6.6
scala.version=2.7.7

View File

@ -4,7 +4,7 @@
package sbt.test
import Scripted._
import FileUtilities.{sbtJar, scalaCompilerJar, scalaLibraryJar, wrapNull}
import FileUtilities.wrapNull
import java.io.File
import java.net.URLClassLoader

View File

@ -32,8 +32,8 @@ private sealed abstract class BasicBuilderProject extends InternalProject with S
log.setLevel(oldLevel)
}
def projectClasspath = compilePath +++ libraries +++ sbtJarPath
def sbtJarPath = Path.lazyPathFinder { Path.fromFile(FileUtilities.sbtJar) :: Nil }
def projectClasspath = compilePath +++ libraries +++ sbtJars
def sbtJars = Path.lazyPathFinder { info.app.mainClasspath.map(Path.fromFile) }
abstract class BuilderCompileConfiguration extends AbstractCompileConfiguration
{
@ -195,7 +195,7 @@ private final class BuilderProject(val info: ProjectInfo, val pluginPath: Path,
def sourceRoots = managedSourcePath
def sources = descendents(sourceRoots, sourceFilter)
def outputDirectory = outputPath / "plugin-classes"
def classpath: PathFinder = pluginClasspath +++ sbtJarPath
def classpath: PathFinder = pluginClasspath +++ sbtJars
def analysisPath = outputPath / "plugin-analysis"
}
}

View File

@ -105,9 +105,10 @@ object ReflectiveCreate
val sourceFile = source.asFile
val outputDirectory = basePath / "target"
for(writeOK <- FileUtilities.write(sourceFile, codeString, log).toLeft("").right;
compileOK <- (new Compile(100))("reflect", source :: Nil, "", outputDirectory, Nil, log).toLeft("").right)
compileOK <- Left("").right)//(new RawCompile(100))("reflect", source :: Nil, "", outputDirectory, Nil, log).toLeft("").right)
yield
{
error("Reintegrate")
val loader = new java.net.URLClassLoader(Array(outputDirectory.asURL), getClass.getClassLoader)
val c = Class.forName(instantiate.name, true, loader)
c.newInstance.asInstanceOf[AnyRef]