Maven错误Failed to read artifact descriptor for xxx:jar 和 missing artifact maven dependency
可参考:http://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place
http://stackoverflow.com/questions/6642146/maven-failed-to-read-artifact-descriptor
在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/ 本博客为自己总结亦或在网上发现的技术博文的转载。 如果文中有什么错误,欢迎指出。以免更多的人被误导。 |