How to run Grails Wrapper (grailsw) behind a proxy?

I tried to run grailsw , but the shell cannot connect to the grails-2.2.1-download.zip download (instead, a file of size 0 bytes is created).

I need to use a proxy server to connect to the Internet, where can I configure proxy settings for Grails Wrapper?

+4
source share
2 answers

After running grails wrapper in the project directory there is a new subdirectory named wrapper with the file grails-wrapper.properties . You can configure the proxy server settings there with the following properties:

 systemProp.http.proxyHost= systemProp.http.proxyPort= systemProp.http.proxyUser= systemProp.http.proxyPassword= systemProp.http.nonProxyHosts= 
+7
source

I solved this problem for myself. This is a two-step process.

1.a) Back up the JRE_HOME \ lib \ security folder. This is important because the steps below can corrupt the cacerts file under jre.

1.b) You need to install the ssl public key from Github.com to the local file system. For this you need to use the InstallCert.java program ( Link to InstallCert.java )

It is assumed that it will run as java InstallCert github.com and when it asks you to enter the certificate number, you need to enter 1 It will create a file called "jssecacerts" in the current directory

1.c) But this program will not work, because it does not know how to authenticate using a proxy. To do this, you need the code from the SSLSocketClientWithTunneling page

Use the above two and create a program that tunnels through a proxy server, retrieves the ssl key and writes a file called jssecerts

2) Update the grails.bat file with additional options. Add these parameters to the% JAVA_EXE% command line. Insert them after% DEFAULT_JVM_OPTS%

-Dhttp.proxyHost = YourproxyURL -Dhttp.proxyPort = YourproxyPort -Dhttps.proxyHost = YourproxyURL -Dhttps.proxyPort = YourproxyPort -Dhttp.proxyUser = YourProxyUseridProxyDsProsProsProsProsProsPhsdprosProsProsPhsProsProhProsProhProsProsProhProsProsProhProsProsProhProsProsProhProsProsProhProsProhProsProsProhProsProsProhProsProsProhProsProsProhProsProsProhProsProsProsProsProhProssProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsProsUpDissProsProsUpProductPreviewPrefirmation .net.ssl.trustStore = path to your-jssecacerts-created-in-step-1

+1
source

Source: https://habr.com/ru/post/1482948/


All Articles