eclipse3.6离线安装maven及问题处理
程序员文章站
2022-03-02 18:24:31
...
参见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文件的代理
但是不可以,无奈将%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
指定正确的setting.xml文件位置,错误消失。
附件是m2eclipse离线插件的压缩文件
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>
但是不可以,无奈将%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
指定正确的setting.xml文件位置,错误消失。
附件是m2eclipse离线插件的压缩文件