MAVEN依赖失败

时间:2016-01-20 12:31:04

标签: maven

请参阅下文我无法在eclipse上运行maven项目

  • 1)下载了eclipse
  • 2)下载了MAVEN存储库
  • 3)设置env变量M2_HOME,MAVEN_HOME,JAVA_HOME
  • 4)设置maven bin文件夹的路径

mvn -version工作正常

在下面的情况下,从cmd运行时无法更新maven请帮助

C:\Users\sridhar.m> mvn eclipse:eclipse
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or on
e of its dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
n-install-plugin:2.4: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 o
r one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.apache.maven.plugins:maven-install-plugin:jar:2.4

2 个答案:

答案 0 :(得分:0)

您是否已将settings.xml复制到.m2文件夹(您的M2_HOME)?

您是否也正确设置了代理(在settings.xml中),以便您的专家可以上网?

希望这有帮助。

答案 1 :(得分:0)

您可能没有在Eclipse中配置Maven的安装 你必须进入Eclispe - >窗口 - >偏好 - > Maven并选择Installations并添加您的资源库Maven和 NOT 的路径,让 EMBEDDED 文件夹。

如果它不起作用,您可能遇到代理问题,因此您必须在文件setting.xmlPath to Maven\conf\setting.xml

下进行配置

GL