mirror of https://github.com/sbt/sbt.git
Merge pull request #3833 from eed3si9n/wip/jna
try to set jna.nosys to true programmatically
This commit is contained in:
commit
bef5c9c996
|
|
@ -20,4 +20,4 @@ install:
|
|||
- SET PATH=C:\sbt\sbt\bin;%PATH%
|
||||
- SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g -Dfile.encoding=UTF8
|
||||
test_script:
|
||||
- sbt "-Djna.nosys=true" "scripted actions/*"
|
||||
- sbt "scripted actions/*"
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ def otherRootSettings =
|
|||
scriptedUnpublished := scriptedUnpublishedTask.evaluated,
|
||||
scriptedSource := (sourceDirectory in sbtProj).value / "sbt-test",
|
||||
// scriptedPrescripted := { addSbtAlternateResolver _ },
|
||||
scriptedLaunchOpts := List("-Xmx1500M", "-Xms512M", "-server", "-Djna.nosys=true"),
|
||||
scriptedLaunchOpts := List("-Xmx1500M", "-Xms512M", "-server"),
|
||||
publishAll := { val _ = (publishLocal).all(ScopeFilter(inAnyProject)).value },
|
||||
publishLocalBinAll := { val _ = (publishLocalBin).all(ScopeFilter(inAnyProject)).value },
|
||||
aggregate in bintrayRelease := false
|
||||
|
|
|
|||
|
|
@ -128,6 +128,9 @@ object StandardMain {
|
|||
def initialState(configuration: xsbti.AppConfiguration,
|
||||
initialDefinitions: Seq[Command],
|
||||
preCommands: Seq[String]): State = {
|
||||
// This is to workaround https://github.com/sbt/io/issues/110
|
||||
sys.props.put("jna.nosys", "true")
|
||||
|
||||
import BasicCommandStrings.isEarlyCommand
|
||||
val userCommands = configuration.arguments.map(_.trim)
|
||||
val (earlyCommands, normalCommands) = (preCommands ++ userCommands).partition(isEarlyCommand)
|
||||
|
|
|
|||
|
|
@ -156,7 +156,8 @@ private[sbt] final class CommandExchange {
|
|||
// rememeber to shutdown only when the server comes up
|
||||
server = Some(x)
|
||||
case Some(Failure(e: AlreadyRunningException)) =>
|
||||
s.log.warn("sbt server could not start because there's another instance of sbt running on this build.")
|
||||
s.log.warn(
|
||||
"sbt server could not start because there's another instance of sbt running on this build.")
|
||||
s.log.warn("Running multiple instances is unsupported")
|
||||
server = None
|
||||
firstInstance.set(false)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ trait ScriptedKeys {
|
|||
}
|
||||
|
||||
object Scripted {
|
||||
// This is to workaround https://github.com/sbt/io/issues/110
|
||||
sys.props.put("jna.nosys", "true")
|
||||
|
||||
lazy val MavenResolverPluginTest = config("mavenResolverPluginTest") extend Compile
|
||||
lazy val RepoOverrideTest = config("repoOverrideTest") extend Compile
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue