mirror of https://github.com/sbt/sbt.git
Ignore comment in .jvmopts on Windows (#213)
This commit is contained in:
parent
aa574a8f8c
commit
06420a7c62
|
|
@ -27,3 +27,4 @@ test_script:
|
||||||
- test.bat
|
- test.bat
|
||||||
- test1.bat
|
- test1.bat
|
||||||
- test2.bat
|
- test2.bat
|
||||||
|
- test3/test3.bat
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
-XX:+CMSClassUnloadingEnabled
|
||||||
|
#-XX:ReservedCodeCacheSize=192m
|
||||||
|
#-Duser.timezone=GMT
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
lazy val check = taskKey[Unit]("")
|
||||||
|
|
||||||
|
lazy val root = (project in file("."))
|
||||||
|
.settings(
|
||||||
|
scalaVersion := "2.12.4",
|
||||||
|
name := "Hello",
|
||||||
|
check := {
|
||||||
|
val xs = IO.readLines(file("output.txt")).toVector
|
||||||
|
|
||||||
|
println(xs)
|
||||||
|
|
||||||
|
assert(xs(0) startsWith "[info] Loading project definition")
|
||||||
|
assert(xs(1) startsWith "[info] Loading settings from build.sbt")
|
||||||
|
assert(xs(2) startsWith "[info] Set current project to Hello")
|
||||||
|
assert(xs(3) startsWith "[info] This is sbt")
|
||||||
|
assert(xs(4) startsWith "[info] The current project")
|
||||||
|
assert(xs(5) startsWith "[info] The current project is built against Scala 2.12.4")
|
||||||
|
|
||||||
|
val ys = IO.readLines(file("err.txt")).toVector.distinct
|
||||||
|
|
||||||
|
assert(ys.size == 1, s"ys has more than one item: $ys")
|
||||||
|
assert(ys(0) startsWith "Java HotSpot(TM) 64-Bit Server VM warning")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
@echo on
|
||||||
|
|
||||||
|
SETLOCAL
|
||||||
|
|
||||||
|
SET JAVA_HOME=C:\jdk9
|
||||||
|
SET PATH=C:\jdk9\bin;%PATH%
|
||||||
|
SET SBT_OPTS=-Xmx4g -Dfile.encoding=UTF8
|
||||||
|
|
||||||
|
SET BASE_DIR=%CD%
|
||||||
|
SET SCRIPT_DIR=%~dp0
|
||||||
|
|
||||||
|
CD %SCRIPT_DIR%
|
||||||
|
"%BASE_DIR%freshly-baked\sbt\bin\sbt" about 1> output.txt 2> err.txt
|
||||||
|
"%BASE_DIR%freshly-baked\sbt\bin\sbt" check
|
||||||
|
CD %BASE_DIR%
|
||||||
|
|
||||||
|
ENDLOCAL
|
||||||
|
|
@ -35,9 +35,11 @@ IF DEFINED JAVA_HOME SET "PATH=%JAVA_HOME%\bin;%PATH%"
|
||||||
|
|
||||||
rem users can set JAVA_OPTS via .jvmopts (sbt-extras style)
|
rem users can set JAVA_OPTS via .jvmopts (sbt-extras style)
|
||||||
IF EXIST .jvmopts FOR /F %%A IN (.jvmopts) DO (
|
IF EXIST .jvmopts FOR /F %%A IN (.jvmopts) DO (
|
||||||
SET JAVA_OPTS=%%A !JAVA_OPTS!
|
SET _jvmopts_line=%%A
|
||||||
|
IF NOT "!_jvmopts_line:~0,1!"=="#" (
|
||||||
|
SET JAVA_OPTS=%%A !JAVA_OPTS!
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
rem We use the value of the JAVACMD environment variable if defined
|
rem We use the value of the JAVACMD environment variable if defined
|
||||||
set _JAVACMD=%JAVACMD%
|
set _JAVACMD=%JAVACMD%
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue