File tree 4 files changed +25
-4
lines changed
starter/src/main/java/grails 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 7
7
# #############################################################################
8
8
9
9
# Add default JVM options here. You can also use JAVA_OPTS and GRAILS_OPTS to pass JVM options to this script.
10
- DEFAULT_JVM_OPTS=" "
10
+ DEFAULT_JVM_OPTS=' "-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1" "-XX:CICompilerCount=3" '
11
11
12
12
13
13
# Use the maximum available, or set MAX_FD != -1 to use that value.
@@ -148,4 +148,4 @@ function splitJvmOpts() {
148
148
}
149
149
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRAILS_OPTS
150
150
151
- exec " $JAVACMD " -jar " $JAR_PATH " " $ {JVM_OPTS[@]}" " $@ "
151
+ exec " $JAVACMD " -jar " ${JVM_OPTS[@]} " " $JAR_PATH " " $@ "
Original file line number Diff line number Diff line change 9
9
if " %OS% " == " Windows_NT" setlocal
10
10
11
11
@ rem Add default JVM options here. You can also use JAVA_OPTS and GRAILS_OPTS to pass JVM options to this script.
12
- set DEFAULT_JVM_OPTS =
12
+ set DEFAULT_JVM_OPTS = " -XX:+TieredCompilation " " -XX:TieredStopAtLevel=1 " " -XX:CICompilerCount=3 "
13
13
14
14
set DIRNAME = %~dp0
15
15
if " %DIRNAME% " == " " set DIRNAME = .
@@ -71,7 +71,7 @@ set CMD_LINE_ARGS=%$
71
71
set JAR_PATH = %APP_HOME% /grails-wrapper.jar
72
72
73
73
@ rem Execute Grails
74
- " %JAVA_EXE% " -jar %JAR_PATH% % DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRAILS_OPTS% %CMD_LINE_ARGS%
74
+ " %JAVA_EXE% " -jar %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRAILS_OPTS% %JAR_PATH % %CMD_LINE_ARGS%
75
75
76
76
:end
77
77
@ rem End local scope for the variables with windows NT shell
Original file line number Diff line number Diff line change 1
1
package grails .init ;
2
2
3
+ import grails .proxy .SystemPropertiesAuthenticator ;
3
4
import org .xml .sax .SAXException ;
4
5
5
6
import javax .xml .parsers .ParserConfigurationException ;
10
11
import java .io .FileOutputStream ;
11
12
import java .io .IOException ;
12
13
import java .lang .reflect .Method ;
14
+ import java .net .Authenticator ;
13
15
import java .net .URL ;
14
16
import java .net .URLClassLoader ;
15
17
import java .nio .channels .Channels ;
@@ -75,6 +77,8 @@ private static boolean updateJar(String version) {
75
77
}
76
78
77
79
public static void main (String [] args ) {
80
+ Authenticator .setDefault (new SystemPropertiesAuthenticator ());
81
+
78
82
try {
79
83
String version = getVersion ();
80
84
Original file line number Diff line number Diff line change
1
+ package grails .proxy ;
2
+
3
+ import java .net .Authenticator ;
4
+ import java .net .PasswordAuthentication ;
5
+
6
+ public class SystemPropertiesAuthenticator extends Authenticator {
7
+
8
+ @ Override
9
+ protected PasswordAuthentication getPasswordAuthentication () {
10
+ if (getRequestorType () == RequestorType .PROXY ) {
11
+ return new PasswordAuthentication (
12
+ System .getProperty ("http.proxyUser" , "" ),
13
+ System .getProperty ("http.proxyPassword" , "" ).toCharArray ());
14
+ }
15
+ return null ;
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments