mirror of https://github.com/sbt/sbt.git
Remove dead / erroneous code
This commit is contained in:
parent
9a61d7bbbf
commit
f02d26c3bf
|
|
@ -101,9 +101,6 @@ case class Launch(
|
||||||
@Short("M")
|
@Short("M")
|
||||||
@Short("main")
|
@Short("main")
|
||||||
mainClass: String,
|
mainClass: String,
|
||||||
@Short("c")
|
|
||||||
@Help("Assume coursier is a dependency of the launched app, and share the coursier dependency of the launcher with it - allows the launched app to get the resolution that launched it via ResolutionClassLoader")
|
|
||||||
addCoursier: Boolean,
|
|
||||||
@Recurse
|
@Recurse
|
||||||
common: CommonOptions
|
common: CommonOptions
|
||||||
) extends CoursierCommand {
|
) extends CoursierCommand {
|
||||||
|
|
@ -117,27 +114,8 @@ case class Launch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val extraForceVersions =
|
|
||||||
if (addCoursier)
|
|
||||||
???
|
|
||||||
else
|
|
||||||
Seq.empty[String]
|
|
||||||
|
|
||||||
val dontFilterOut =
|
|
||||||
if (addCoursier) {
|
|
||||||
val url = classOf[coursier.core.Resolution].getProtectionDomain.getCodeSource.getLocation
|
|
||||||
|
|
||||||
if (url.getProtocol == "file")
|
|
||||||
Seq(new File(url.getPath))
|
|
||||||
else {
|
|
||||||
Console.err.println(s"Cannot get the location of the JAR of coursier ($url not a file URL)")
|
|
||||||
sys.exit(255)
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
Seq.empty[File]
|
|
||||||
|
|
||||||
val helper = new Helper(
|
val helper = new Helper(
|
||||||
common.copy(forceVersion = common.forceVersion ++ extraForceVersions),
|
common.copy(forceVersion = common.forceVersion),
|
||||||
rawDependencies
|
rawDependencies
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -147,7 +125,7 @@ case class Launch(
|
||||||
files0.map(_.toURI.toURL).toArray,
|
files0.map(_.toURI.toURL).toArray,
|
||||||
new ClasspathFilter(
|
new ClasspathFilter(
|
||||||
Thread.currentThread().getContextClassLoader,
|
Thread.currentThread().getContextClassLoader,
|
||||||
Coursier.baseCp.map(new File(_)).toSet -- dontFilterOut,
|
Coursier.baseCp.map(new File(_)).toSet,
|
||||||
exclude = true
|
exclude = true
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ object Util {
|
||||||
|
|
||||||
class Helper(
|
class Helper(
|
||||||
common: CommonOptions,
|
common: CommonOptions,
|
||||||
remainingArgs: Seq[String]
|
rawDependencies: Seq[String]
|
||||||
) {
|
) {
|
||||||
import common._
|
import common._
|
||||||
import Helper.errPrintln
|
import Helper.errPrintln
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue