代码改变世界

解决eclipse创建maven项目报错!Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp

2014-08-23 13:49  luxr123  阅读(952)  评论(0编辑  收藏  举报

maveneclipse测试

我是使用代理上网的。在创建maven时报以下错误:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories.

7af40a1

解决办法: 首先找到 config/settting.xml 在里面添加代理信息 ----------  这个是重点:

<proxies>
<proxy>
<id>my-proxy</id>
<active>true</active>
<protocol>http</protocol>
<username>dgfd514</username>
<password>165415</password>
<host>10.101.1.6</host>
<port>80</port>
<!-- <nonProxyHosts>local.net|some.host.com</nonProxyHosts> -->
</proxy>

</proxies>

 

然后重创建maven项目,表示本地测试创建成功