mirror of https://github.com/sbt/sbt.git
Correct classpath for plugins
This commit is contained in:
parent
41563c59bb
commit
14db8c2079
|
|
@ -110,6 +110,7 @@ class Launch(val bootDirectory: File, repositories: List[Repository]) extends xs
|
||||||
def target = new UpdateApp(Application(id))
|
def target = new UpdateApp(Application(id))
|
||||||
def failLabel = id.name + " " + id.version
|
def failLabel = id.name + " " + id.version
|
||||||
def lockFile = updateLockFile
|
def lockFile = updateLockFile
|
||||||
|
def mainClasspath = classpath
|
||||||
|
|
||||||
lazy val mainClass: Class[T] forSome { type T <: xsbti.AppMain } =
|
lazy val mainClass: Class[T] forSome { type T <: xsbti.AppMain } =
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ trait Provider extends NotNull
|
||||||
def parentLoader: ClassLoader
|
def parentLoader: ClassLoader
|
||||||
def lockFile: File
|
def lockFile: File
|
||||||
|
|
||||||
|
def classpath = Provider.getJars(baseDirectories)
|
||||||
|
|
||||||
def retrieveFailed: Nothing = fail("")
|
def retrieveFailed: Nothing = fail("")
|
||||||
def retrieveCorrupt(missing: Iterable[String]): Nothing = fail(": missing " + missing.mkString(", "))
|
def retrieveCorrupt(missing: Iterable[String]): Nothing = fail(": missing " + missing.mkString(", "))
|
||||||
private def fail(extra: String) =
|
private def fail(extra: String) =
|
||||||
|
|
@ -44,7 +46,7 @@ trait Provider extends NotNull
|
||||||
}
|
}
|
||||||
def createLoader =
|
def createLoader =
|
||||||
{
|
{
|
||||||
val jars = Provider.getJars(baseDirectories)
|
val jars = classpath
|
||||||
(jars, new URLClassLoader(jars.map(_.toURI.toURL), parentLoader) )
|
(jars, new URLClassLoader(jars.map(_.toURI.toURL), parentLoader) )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package xsbti;
|
package xsbti;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
public interface AppProvider
|
public interface AppProvider
|
||||||
{
|
{
|
||||||
/** Returns the ScalaProvider that this AppProvider will use. */
|
/** Returns the ScalaProvider that this AppProvider will use. */
|
||||||
|
|
@ -14,5 +16,8 @@ public interface AppProvider
|
||||||
* It is guaranteed that newMain().getClass() == mainClass()*/
|
* It is guaranteed that newMain().getClass() == mainClass()*/
|
||||||
public AppMain newMain();
|
public AppMain newMain();
|
||||||
|
|
||||||
|
/** The classpath from which the main class is loaded, excluding Scala jars.*/
|
||||||
|
public File[] mainClasspath();
|
||||||
|
|
||||||
public ComponentProvider components();
|
public ComponentProvider components();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue