Maven错误Failed to read artifact descriptor for xxx:jar 和 missing artifact maven dependency

在MyEclipse中执行Maven的install命令时或者Maven项目中的pom.xml增加新的依赖时,报“Failed to read artifact descriptor for xxx:jar ”或者"missing artifact maven dependency"的错误。这可能是在下载过程中文件出现错误。

解决办法:从本地的maven库中删除相关的jar包,然后右单击项目,Maven4MyEclipse->Update Project,在弹出的对话框中选择“Force Update Of Snapshots/Releases"

然后点击“OK”。这样就会重新下载这个jar包。

 

不同的Eclipse版本项目右键Maven只有会有不同的子菜单:

我的如下图:

 

 

然后点击"OK" 就可以了........

//=================================================

此外还有提供的另外几种方式....(个人尝试没有效果)

There are a few other options apart from Project->Clean, some of which are more along the lines of turning it off and on again.

  • Try right-clicking on the project and selecting Maven->Update Project Configuration.
  • Disable then re-enable dependency management (right-click Maven->Disable Dependency Management then Maven->Enable Dependency Management
  • Close the project and reopen it.
  • Check that your Maven settings are configured correctly. If you are behind a proxy you'll need toconfigure the proxy settings in the global or user settings.
  • Check you're using the Maven installation you expect. By default m2eclipse uses the embedder, if you have a separate installation you may want to configure m2eclipse to use the external installation so that CLI and Eclipse builds are consistent. This also ensures you're configured to connect through any proxy as above.

 


本文转自SummerChill博客园博客,原文链接:http://www.cnblogs.com/DreamDrive/p/5775087.html,如需转载请自行联系原作者