Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用代理后的命令行创建maven项目时出现问题_Maven_Testing_Proxy - Fatal编程技术网

使用代理后的命令行创建maven项目时出现问题

使用代理后的命令行创建maven项目时出现问题,maven,testing,proxy,Maven,Testing,Proxy,我在setting.xml中添加了正确的代理。但是当我运行mvn命令来创建maven项目时: mvn archetype:generate -DgroupId=testDemo -DartifactId=demo1 -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false 我得到以下错误。我尝试了不同的代理和系统,但得到了相同的错误。当我在eclipse中创建maven项目时,也会遇到同样的错误。 这是一

我在setting.xml中添加了正确的代理。但是当我运行mvn命令来创建maven项目时:

mvn archetype:generate -DgroupId=testDemo -DartifactId=demo1  -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
我得到以下错误。我尝试了不同的代理和系统,但得到了相同的错误。当我在eclipse中创建maven项目时,也会遇到同样的错误。 这是一个网络问题,还是可以通过在setting.xml中进行一些更改来解决

[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://r
epo.maven.apache.org/maven2 was cached in the local repository, resolution will
not be reattempted until the update interval of central has elapsed or updates a
re forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-m
etadata.xml from/to central (http://repo.maven.apache.org/maven2): Not authorize
d by proxy , ReasonPhrase:Proxy Authentication Required.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.278s
[INFO] Finished at: Fri Aug 23 17:52:36 IST 2013
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'archetype' in the current project and in the
 plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the
repositories [local (E:\Maven\m2repo), central (http://repo.maven.apache.org/mav
en2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:

这是一个网络问题。目前,您的防火墙正在阻止maven repo
http://repo.maven.apache.org/
我想您需要在
setting.xml中更新代理URL、用户名和密码


另一个例外是显示
需要身份验证
,因此我假设未配置代理凭据

我已经在setting.xml中更新了代理url、用户名和密码。在某些系统中它工作,但在某些系统中它不工作