Exclude launcher jar from unmanaged classpath, allowing it to be put in the lib/ or project root directories.

This commit is contained in:
Mark Harrah 2010-02-04 18:57:29 -05:00
parent 31822b2e17
commit 7119c1adbe
1 changed files with 4 additions and 2 deletions

View File

@ -43,12 +43,14 @@ trait UnmanagedClasspathProject extends ClasspathProject
/** The classpath containing all jars in the unmanaged directory. */ /** The classpath containing all jars in the unmanaged directory. */
def unmanagedClasspath: PathFinder = def unmanagedClasspath: PathFinder =
{ {
val base = descendents(dependencyPath, "*.jar") val base = descendents(dependencyPath, jarFilter)
if(scratch) if(scratch)
base +++ (info.projectPath * "*.jar") base +++ (info.projectPath * jarFilter)
else else
base base
} }
/* Explicitly filter (x)sbt-launch(er)-<version>.jar, since it contains minified versions of various classes.*/
private def jarFilter: NameFilter = "*.jar" - "*sbt-launch*.jar"
/** The classpath containing all unmanaged classpath elements for the given configuration. This typically includes /** The classpath containing all unmanaged classpath elements for the given configuration. This typically includes
* at least 'unmanagedClasspath'.*/ * at least 'unmanagedClasspath'.*/
def fullUnmanagedClasspath(config: Configuration): PathFinder def fullUnmanagedClasspath(config: Configuration): PathFinder