From b2d54b6771bcde6408545dad4a7583fb3b2fe271 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Thu, 1 Apr 2010 20:18:26 -0400 Subject: [PATCH] put 'provided' configuration on the right classpaths --- sbt/src/main/scala/sbt/DefaultProject.scala | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sbt/src/main/scala/sbt/DefaultProject.scala b/sbt/src/main/scala/sbt/DefaultProject.scala index bdc79d1de..045a5d975 100644 --- a/sbt/src/main/scala/sbt/DefaultProject.scala +++ b/sbt/src/main/scala/sbt/DefaultProject.scala @@ -125,19 +125,22 @@ abstract class BasicScalaProject extends ScalaProject with BasicDependencyProjec * by default. */ def docClasspath = compileClasspath /** A PathFinder that provides the classpath to pass to the compiler.*/ - def compileClasspath = fullClasspath(Compile) +++ optionalClasspath + def compileClasspath = fullClasspath(Compile) +++ optionalClasspath +++ providedClasspath /** A PathFinder that provides the classpath to use when unit testing.*/ - def testClasspath = fullClasspath(Test) +++ optionalClasspath + def testClasspath = fullClasspath(Test) +++ optionalClasspath +++ providedClasspath /** A PathFinder that provides the classpath to use when running the class specified by 'getMainClass'.*/ - def runClasspath = fullClasspath(Runtime) +++ optionalClasspath + def runClasspath = fullClasspath(Runtime) +++ optionalClasspath +++ providedClasspath /** A PathFinder that provides the classpath to use for a Scala interpreter session.*/ - def consoleClasspath = fullClasspath(consoleConfiguration) +++ optionalClasspath + def consoleClasspath = fullClasspath(consoleConfiguration) +++ optionalClasspath +++ providedClasspath /** A PathFinder that corresponds to Maven's optional scope. It includes any managed libraries in the * 'optional' configuration for this project only.*/ def optionalClasspath = managedClasspath(Optional) + /** A PathFinder that corresponds to Maven's provided scope. It includes any managed libraries in the + * 'provided' configuration for this project only.*/ + def providedClasspath = managedClasspath(Provided) /** A PathFinder that contains the jars that should be included in a comprehensive package. This is * by default the 'runtime' classpath excluding the 'provided' classpath.*/ - def publicClasspath = runClasspath --- fullClasspath(Provided) + def publicClasspath = runClasspath --- providedClasspath /** This returns the unmanaged classpath for only this project for the given configuration. It by * default includes the main compiled classes for this project and the libraries in this project's