【Grails 代理Proxy设置】部署Grails遇到Error Resolve error obtaining dependencies:错误,及解决方法
2015-07-01 01:18
633 查看
最近在使用Grails,一开始使用3.0.2版本,一直包nullpointer错误,后来使用了2.5.0版本,可以创建工程,但是在进入到工程目录后,再执行grails程序,报错了,步骤如下:
1. grails create-app helloworld // 成功
2. cd helloworld
3. grails // 出错,信息如下
| Configuring classpath
| Error Resolve error obtaining dependencies: Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.55.2 from/to grailsCentral (https://repo.grails.org/grails/plugins): Connect to repo.grails.org:443 timed out (Use --stacktrace to see the full trace)
字面看是连接不通,后来尝试修改代理地址(我公司需要用代理才可以访问外网),还是失败。
后来发现是需要设置grails的代理才行,如下:
1. 设置命令
2. 打开~/.grails/ProxySettings.groovy,发现内容如下(WIN7平台出错,mac平台正常,大家可以注意一下):
myproxy=['http.proxyHost':true, 'http.proxyPort':true, 'http.proxyUser':'', 'http.proxyPassword':'', 'http.nonProxyHosts':'']
currentProxy='myproxy'
然后手动修改了host和port,再执行 grails,成功了。
1. grails create-app helloworld // 成功
2. cd helloworld
3. grails // 出错,信息如下
| Configuring classpath
| Error Resolve error obtaining dependencies: Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.55.2 from/to grailsCentral (https://repo.grails.org/grails/plugins): Connect to repo.grails.org:443 timed out (Use --stacktrace to see the full trace)
字面看是连接不通,后来尝试修改代理地址(我公司需要用代理才可以访问外网),还是失败。
后来发现是需要设置grails的代理才行,如下:
1. 设置命令
grails add-proxy myproxy --host=<server> --port=<port> --username=<username> --password=<password> grails set-proxy myproxy
2. 打开~/.grails/ProxySettings.groovy,发现内容如下(WIN7平台出错,mac平台正常,大家可以注意一下):
myproxy=['http.proxyHost':true, 'http.proxyPort':true, 'http.proxyUser':'', 'http.proxyPassword':'', 'http.nonProxyHosts':'']
currentProxy='myproxy'
然后手动修改了host和port,再执行 grails,成功了。
相关文章推荐
- Golang Email
- Convolutional Neural Networks at Constrained Time Cost(精读)
- AI1.1-人工智能史
- AI1.1-人工智能史
- DELL服务器 RAID 磁盘阵列配置图解
- leetcode--217&219&220 Contains Duplicate(重复)I&II&III
- 默认端口:ftp,ssh,telnet,dhcp,mail,pop3,smtp,dns,http,sm等
- AXD Error:Processor ARM79_0 raised an exception. Cause: The processor was reset
- Contains Duplicate III
- error inflating class com.baidu.mapapi.map.mapview
- Contains Duplicate
- LeetCode || Submission Details
- YTU 1011 Rails 栈
- 十四步实现拥有强大AI的五子棋游戏
- 转载zain
- 工作日志--servicemain编译
- "set -e" 与 "set -o pipefail"
- 关于 error: LNK1123: failure during conversion to COFF: file invalid or corrupt 错误的解决...
- cvWaitKey源码的理解(OpenCV函数)
- WinMain函数的4个参数