我正在尝试使用Maven(https://developers.google.com/appengine/docs/java/gettingstarted/uploading)上传我的Google应用引擎项目。
由于无法从伊朗访问Google App Engine,我尝试使用代理进行连接,在部署python项目时代理工作正常。
我将Maven global settings.xml设置如下:
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>https</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>127.0.0.1</host>
<port>8580</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
我将settings.xml复制到本地设置目录,其中mvn -X读取配置文件。但我仍然得到这个错误:
Beginning interaction for module default...
Sep 08, 2014 3:31:11 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=tactile-visitor-696&version=1-war&
403 Forbidden
<!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"><title>Error 403 (Forbidden)!!1</title><style>*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/errors/logo_sm_2.png) no-repeat}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/errors/logo_sm_2_hr.png) 0}}@media only screen and (-webkit-min-device-pixel-r
atio:2){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:55px;width:150px}</style><a href=//www.google.com/><span id=logo aria-label=Google></span></a><p><b>403.</b> <ins>ThatΓÇÖs an error.</ins><p>Your client does not have permission to get URL <code>/api/appversion/getresourcelimits?app_id=tactile-visitor-696&version=1-war&</code> from this server. (Client IP address: 5.222.64.189)<br><br>We're sorry, but this service is not available in your country.<ins>ThatΓÇÖs all we know.</ins>
这意味着Maven试图在没有使用代理的情况下发布到https://appengine.google.com/api/appversion/getresourcelimits?app_id=tactile-visitor-696&version=1-war&。
我读过其他类似的问题,如:
Maven ignores settings.xml file
Maven proxy settings not working
但他们帮助不大。
我应该如何配置Maven来解决这个问题?