代理背后的 grails / 重定向到 https
grails behind a proxy / redirected to https
几个月前我在代理后面创建了一个 grails 应用程序(一切正常,即通过代理初始加载所有依赖项)。
现在我想给它添加一些新的插件,其他一些人也应该在他们的机器上启动应用程序和运行。
因此 grails (ProxySettings.groovy) 中的 ProxySetting 是:
client=['http.proxyHost':"1.2.3.4", 'http.proxyPort':"8080",
'http.proxyUser':'', 'http.proxyPassword':'', 'http.nonProxyHosts':'']
currentProxy='myproxy'
但是:当我尝试通过例如
增强应用程序时
compile ":jasper:1.11.0"
我收到一个错误:
==== grailsCentral: tried
http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/jasper-1.11.0.pom
-- artifact org.grails.plugins#jasper;1.11.0!jasper.zip:
http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#jasper;1.11.0: not found
::::::::::::::::::::::::::::::::::::::::::::::
我发现,当我尝试通过
从 URL 获取 pom 或 zip 文件时
wget http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip
--2015-03-12 11:24:27-- http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip
Connecting to 1.2.3.4:8080... connected.
Proxy request sent, awaiting response... 302 Found
Location: https://repo.grails.org/grails/plugins-releases-local/org/grails/plugins/jasper/1.11.0/jasper-1.11.0.zip [following]
重定向到https!
所以在 wget 中,这仅在我 export https_proxy=http://1.2.3.4:8080
时有效
所以我尝试在 ProxySettings.groovy 中这样配置它:
myproxy=['https.proxyHost':'10.206.247.65', 'https.proxyPort':'8080',
'http.proxyHost':'10.206.247.65', 'http.proxyPort':'8080']
但这无济于事。
有什么方法可以告诉 grails 也将代理用于 https 连接或任何其他方法来解决这个问题?
我们遇到了类似的问题,将 BuildConfig 中 repositories{}
下的 grailsPlugins()
条目更改为 mavenRepo "http://repo.grails.org/grails/plugins"
我不确定这是否是最好的长期解决方案,但它确实阻止了 Grails 尝试通过 https 查找插件。
几个月前我在代理后面创建了一个 grails 应用程序(一切正常,即通过代理初始加载所有依赖项)。 现在我想给它添加一些新的插件,其他一些人也应该在他们的机器上启动应用程序和运行。
因此 grails (ProxySettings.groovy) 中的 ProxySetting 是:
client=['http.proxyHost':"1.2.3.4", 'http.proxyPort':"8080",
'http.proxyUser':'', 'http.proxyPassword':'', 'http.nonProxyHosts':'']
currentProxy='myproxy'
但是:当我尝试通过例如
增强应用程序时compile ":jasper:1.11.0"
我收到一个错误:
==== grailsCentral: tried
http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/jasper-1.11.0.pom
-- artifact org.grails.plugins#jasper;1.11.0!jasper.zip:
http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#jasper;1.11.0: not found
::::::::::::::::::::::::::::::::::::::::::::::
我发现,当我尝试通过
从 URL 获取 pom 或 zip 文件时wget http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip
--2015-03-12 11:24:27-- http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip
Connecting to 1.2.3.4:8080... connected.
Proxy request sent, awaiting response... 302 Found
Location: https://repo.grails.org/grails/plugins-releases-local/org/grails/plugins/jasper/1.11.0/jasper-1.11.0.zip [following]
重定向到https!
所以在 wget 中,这仅在我 export https_proxy=http://1.2.3.4:8080
所以我尝试在 ProxySettings.groovy 中这样配置它:
myproxy=['https.proxyHost':'10.206.247.65', 'https.proxyPort':'8080',
'http.proxyHost':'10.206.247.65', 'http.proxyPort':'8080']
但这无济于事。 有什么方法可以告诉 grails 也将代理用于 https 连接或任何其他方法来解决这个问题?
我们遇到了类似的问题,将 BuildConfig 中 repositories{}
下的 grailsPlugins()
条目更改为 mavenRepo "http://repo.grails.org/grails/plugins"
我不确定这是否是最好的长期解决方案,但它确实阻止了 Grails 尝试通过 https 查找插件。