关于eclipse 项目导入不了 maven依赖的解决办法

1、首先确定你的项目是maven 项目 ,如果不是:项目右键Configure -->Convert to maven project。

2、在SVN导出的Maven项目,或以前不是用Maven管理的项目想要转换成Maven项目,但Myeclipse中右键Configure 找不到Convert to maven project选项,因此需要如下设置:

Window > Preferences > General > Capabilities > Advanced > MyEclipse Standard Tools > check the option WTP (Deprecated).
3、如果已经是maven项目了还是没有maven 依赖导入 右击项目 properties  —java build path看 libraries 下是否有 maven dependencies ,如果没有:你需要将 <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>  这一行代码放到你项目的编译workspace 里的 .classpath 文件里 再重新加载项目就OK了。

 

猜你喜欢

转载自www.cnblogs.com/timao/p/12216703.html