eclipse3.6离线安装maven及问题处理
参见inotgaoshou的
eclipse3.6或myeclipse9离线方式安装文章maven3http://inotgaoshou.iteye.com/blog/978600
安装后创建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>
