Most companies have set up proxy to protect, and speed up their network, but grails
, and gradle
would not download the libraries needed correctly behind the proxy without proper setup.
bin
. My case would be D:\grails-3.3.6\bin
.grails.bat
.set DEFAULT_JVM_OPTS
, and change it to (in one line)set DEFAULT_JVM_OPTS="-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1" "-XX:CICompilerCount=3" "-Dhttp.proxyHost=THE_PROXY_PATH" "-Dhttp.proxyPort=THE_PROXY_PORT" "-Dhttp.proxyUser=YOUR_USERNAME" "-Dhttp.proxyPassword=YOUR_PASSWORD" "-Dhttps.proxyHost=THE_PROXY_PATH" "-Dhttps.proxyPort=THE_PROXY_PORT" "-Dhttps.proxyUser=YOUR_USERNAME" "-Dhttps.proxyPassword=YOUR_PASSWORD"
THE_PROXY_PATH
, THE_PROXY_PORT
, YOUR_USERNAME
, YOUR_PASSWORD
according to your own setting.C:\Users\YOUR_LOGIN\
.m2
.settings.xml
.<settings> <proxies> <proxy> <id>http</id> <active>true</active> <protocol>http</protocol> <host>THE_PROXY_PATH<host> <port>THE_PROXY_PORT</port> <username>YOUR_USER_NAME</username> <password>YOUR_PASSWORD</password> </proxy> <proxy> <id>https</id> <active>true</active> <protocol>https</protocol> <host>THE_PROXY_PATH</host> <port>THE_PROXY_PORT</port> <username>YOUR_USER_NAME</username> <password>YOUR_PASSWORD</password> </proxy> </proxies> </settings>