diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-09-22 14:34:11 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-09-22 14:34:11 +0000 |
commit | 4466e36c4dd278b2d25f7611fc84655d0728966a (patch) | |
tree | 7d1061e4ebfcc8fdee05ead538f52faad059fea2 /src | |
parent | 44e60b3ae61a4eccc1ee8ae4be2f8292c33a3d59 (diff) | |
download | scala-4466e36c4dd278b2d25f7611fc84655d0728966a.tar.gz scala-4466e36c4dd278b2d25f7611fc84655d0728966a.tar.bz2 scala-4466e36c4dd278b2d25f7611fc84655d0728966a.zip |
improved patch from james matlik
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/ant/ScalaTool.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/ant/ScalaTool.scala b/src/compiler/scala/tools/ant/ScalaTool.scala index 26c0b48cfa..b64c4481a5 100644 --- a/src/compiler/scala/tools/ant/ScalaTool.scala +++ b/src/compiler/scala/tools/ant/ScalaTool.scala @@ -67,6 +67,10 @@ class ScalaTool extends MatchingTask { * folders in "lib/" are automatically added. */ private var classpath: List[String] = Nil + /** An (optional) path to JARs that this script depends on relative to the + * ant project's basedir. */ + private var classpathPath: Path = emptyPath + /** Comma-separated Java system properties to pass to the JRE. Properties * are formated as name=value. Properties scala.home, scala.tool.name and * scala.tool.version are always set. */ @@ -118,6 +122,12 @@ class ScalaTool extends MatchingTask { } /** + * A special method that allows ant classpath path definitions to be nested + * within this ant task. + */ + def createClassPath: Path = classpathPath.createPath() + + /** * Adds an Ant Path reference to the tool's classpath. * Note that all entries in the path must exist either relative to the project * basedir or with an absolute path to a file in the filesystem. As a result, @@ -260,6 +270,9 @@ class ScalaTool extends MatchingTask { ("javaflags", javaFlags), ("toolflags", toolFlags) ) + // Consolidate Paths into classpath + classpath = classpath ::: classpathPath.list.toList + // Generate the scripts if (platforms.contains("unix")) { val unixPatches = patches + (("classpath", getUnixclasspath)) val unixTemplateResource = resourceRoot + "tool-unix.tmpl" |