eclipse3.6离线安装maven及问题处理

参见inotgaoshou的
eclipse3.6或myeclipse9离线方式安装文章maven3[url]http://inotgaoshou.iteye.com/blog/978600[/url]
安装后创建maven项目运行mvn compile报错
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its d
ependencies could not be resolved: Failed to read artifact descriptor for org.ap
ache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org
.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.
maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Co
nnection timed out: connect -> [Help 1]

原因是局域网代理设置导致的,虽然按照《maven实战》的说法设置C:\Users\用户名\.m2\repository的settings.xml文件的代理


<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
| specification in this list marked as active will be used.
|-->
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
-->
<proxy>
<id>my-proxy</id>
<active>true</active>
<protocol>http</protocol>
<username>username</username>
<password>password</password>
<host>proxy.*.*</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>

</proxies>

但是不可以,无奈将%M2_HOME%/conf/settings.xml的代理部分也设置了一下,该错误消失,maven可以正常使用。

使用m2eclipse创建maven项目时提示
提示:
could not resolve archetype
org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories
eclipse的windows>preferences>Maven>User Settings
[img]http://dl.iteye.com/upload/attachment/0063/8431/09e5b32b-83b1-3811-99b6-1f63c41c58c5.png[/img]

指定正确的setting.xml文件位置,错误消失。

附件是m2eclipse离线插件的压缩文件
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值