diff --git a/notes b/notes index d8945e05a..932fb6faa 100644 --- a/notes +++ b/notes @@ -12,7 +12,6 @@ As usual: - Robust, flexible API ISSUES - - webapp: Jetty 7 + jsp - java sources are not recompiled when jars change: possibly binary dependencies are not recorded? TODO diff --git a/project/build.properties b/project/build.properties index 3af14e694..e3976ccc1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1,5 +1,6 @@ project.organization=org.scala-tools.sbt project.name=xsbt -sbt.version=0.5.6 -project.version=0.6.13 -scala.version=2.7.7 +sbt.version=0.6.13 +project.version=0.7.0-SNAPSHOT +build.scala.versions=2.7.7 +def.scala.version=2.7.7 diff --git a/project/build/LauncherProguard.scala b/project/build/LauncherProguard.scala index 1d441cd18..adb510625 100644 --- a/project/build/LauncherProguard.scala +++ b/project/build/LauncherProguard.scala @@ -4,7 +4,7 @@ import java.io.File trait ProguardLaunch extends ProguardProject { override def basicOptions = super.basicOptions ++ Seq(keepJLine) - def outputJar = rootProject.outputPath / ("xsbt-launch-" + version + ".jar") + def outputJar = rootProject.outputPath / ("sbt-launch-" + version + ".jar") override def keepClasses = "org.apache.ivy.plugins.resolver.URLResolver" :: "org.apache.ivy.plugins.resolver.IBiblioResolver" :: @@ -13,10 +13,9 @@ trait ProguardLaunch extends ProguardProject override def mapInJars(inJars: Seq[File]) = { val inputJar = jarPath.asFile.getAbsolutePath - val runtimeClasspath = runClasspath.get.map(_.asFile).toList - val jlineJars = runtimeClasspath.filter(isJLineJar) + val (jlineJars, notJLine) = inJars.partition(isJLineJar) // pull out Ivy in order to exclude resources inside - val (ivyJars, notIvy) = inJars.partition(_.getName.startsWith("ivy")) + val (ivyJars, notIvy) = notJLine.partition(isIvyJar) val otherJars = notIvy.filter(jar => !isJarX(jar, "scala-compiler")) log.debug("proguard configuration ivy jar location: " + ivyJars.mkString(", ")) @@ -40,8 +39,9 @@ trait ProguardLaunch extends ProguardProject "org/apache/ivy/plugins/report/ivy-report-*" :: Nil - private def withJar[T](files: Seq[File], name: String) = mkpath(files.firstOption.getOrElse(error(name + " not present (try running update)"))) + private def withJar[T](files: Iterable[File], name: String) = mkpath(files.toSeq.firstOption.getOrElse(error(name + " not present (try running update)"))) private def isJLineJar(file: File) = isJarX(file, "jline") + private def isIvyJar(file: File) = isJarX(file, "ivy") private def isJarX(file: File, x: String) = { val name = file.getName diff --git a/project/build/XSbt.scala b/project/build/XSbt.scala index d9c1eef5c..c95ac3b18 100644 --- a/project/build/XSbt.scala +++ b/project/build/XSbt.scala @@ -66,6 +66,7 @@ class XSbt(info: ProjectInfo) extends ParentProject(info) //run in parallel override def parallelExecution = true + override def disableCrossPaths = true def jlineRev = "0.9.94" def jlineDep = "jline" % "jline" % jlineRev intransitive() @@ -78,7 +79,7 @@ class XSbt(info: ProjectInfo) extends ParentProject(info) val jline = jlineDep val ivy = "org.apache.ivy" % "ivy" % "2.0.0" def rawJarPath = jarPath - override final def crossScalaVersions = Set.empty // don't need to cross-build, since the distributed jar is standalone (proguard) + override def disableCrossPaths = true lazy val rawPackage = packageTask(packagePaths +++ launchInterfaceSub.packagePaths, rawJarPath, packageOptions).dependsOn(compile) // to test the retrieving and loading of the main sbt, we package and publish the test classes to the local repository override def defaultMainArtifact = Artifact(testID) @@ -220,20 +221,19 @@ class XSbt(info: ProjectInfo) extends ParentProject(info) } trait JavaProject extends BasicScalaProject { - override final def crossScalaVersions = Set.empty // don't need to cross-build Java sources + override def disableCrossPaths = true // ensure that interfaces are only Java sources and that they cannot reference Scala classes override def mainSources = descendents(mainSourceRoots, "*.java") override def compileOrder = CompileOrder.JavaThenScala } trait SourceProject extends BasicScalaProject { - override final def crossScalaVersions = Set.empty // don't need to cross-build a source package + override def disableCrossPaths = true override def packagePaths = mainResources +++ mainSources // the default artifact is a jar of the main sources and resources } trait ManagedBase extends BasicScalaProject { override def deliverScalaDependencies = Nil - override def crossScalaVersions = Set("2.7.2", "2.7.5") override def managedStyle = ManagedStyle.Ivy override def useDefaultConfigurations = false val defaultConf = Configurations.Default