我想创建maven项目但失败了。我在网络中使用代理。我可以到达" https://repo.maven.apache.org/maven2"在浏览器中。错误显示:
无法解析原型 org.apache.maven.archetypes:maven-archetype-webapp:1.0来自任何一个 配置的存储库。无法解决工件 org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0无法 转移神器 org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from / to central(https://repo.maven.apache.org/maven2):连接超时 无法转移神器 org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from / to central(https://repo.maven.apache.org/maven2):连接超时
我已经创建了setting.xml并将其放到.m2文件夹中。 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>
此设置代理,端口,用户名和密码与浏览器中的设置相同,我可以运行互联网。我认为配置是正确的。如何解决这个问题?感谢。
答案 0 :(得分:0)
它应该是settings.xml,而不是setting.xml
或者,如果您确实要使用此setting.xml,请从命令行将maven指向此xml文件
HTTP Request