[英]cannot create maven project
I want to create maven project but failed. 我想创建Maven项目,但失败了。 I use proxy in my network.
我在网络中使用代理。 I can reach " https://repo.maven.apache.org/maven2 " in browser.
我可以在浏览器中访问“ https://repo.maven.apache.org/maven2 ”。 the error show:
错误显示:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories.
无法从任何已配置的存储库解析原型org.apache.maven.archetypes:maven-archetype-webapp:1.0。 Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 Could not transfer artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from/to central ( https://repo.maven.apache.org/maven2 ): Connect timed out Could not transfer artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from/to central ( https://repo.maven.apache.org/maven2 ): Connect timed out
无法解析工件org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0无法将工件org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0从/转移到中央( https:/ /repo.maven.apache.org/maven2 ):连接超时无法将工件org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0从/传输到中央( https://repo.maven.apache .org / maven2 ):连接超时
I already create setting.xml and put to .m2 folder. 我已经创建了setting.xml并放入了.m2文件夹。 the setting.xml contains:
setting.xml包含:
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>idnproxy.myproxy.asia</host>
<port>8080</port>
<username>c76266</username>
<password>Password09</password>
<nonProxyHosts>localhost|128.*.*.*|10.*.*.*|*.intranet.asia|*.group.local</nonProxyHosts>
</proxy>
</proxies>
this setting proxy, port, username and password same with setting in my browser and I can running internet. 此设置代理,端口,用户名和密码与浏览器中的设置相同,并且我可以运行互联网。 I assume that configuration is true.
我认为配置是正确的。 how to fix this problem?
如何解决这个问题? thanks.
谢谢。
It should be settings.xml , not setting.xml 它应该是settings.xml,而不是setting.xml
Or if you do want to use this setting.xml , from command line, point maven to this xml file 或者,如果您确实要使用此setting.xml,请从命令行将maven指向此xml文件。
mvn -s Full_PATH_TO_setting.xml install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.