Maven项目无法产生Maven Dependencies

转自 : http://www.lai18.com/content/10765577.html

Maven项目无法产生Maven Dependencies

按照教程安装完Maven新建一个maven项目,闹腾的出现的如下情况:Maven项目没有了Maven Dependencies这就郁闷了;如图:




百度上的:重启 Maven Dependency就行,

操作方式: 右击 web project --> Properties --> Macven --> Enable Dependency Management 

可是我连Enable Dependency Management 都没有啊,这就郁闷了,检查了各种配置发现没有什么错误;



后来还是GOOGLE给力啊,百度什么的太弱了;解决方案:

1.找到项目的.classpath文件(去项目文件夹找)

2.检测.classpath中是否有如下代码:

[html]  view plain copy
 
  1. <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">  
  2. <attributes>  
  3. <attribute name="maven.pomderived" value="true"/>  
  4. <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>  
  5. </attributes>  
  6. </classpathentry>  



如图:




3.没有的话加到尾部:我的如图:




重启eclipse后就OK了,如图:




其实最简便的方法就是,把项目中的classpath ,settings,target全部删除,重新导入eclipse中。

猜你喜欢

转载自slnddd.iteye.com/blog/2352860