当前位置: 代码迷 >> Eclipse >> eclipse 配备maven项目
  详细解决方案

eclipse 配备maven项目

热度:65   发布时间:2016-04-23 01:19:47.0
eclipse 配置maven项目

一般会在.project中出现

??? <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>

?

修改如下项目文件

在.project 文件添加

??? <buildSpec>
??? ??? <buildCommand>
??? ??? ??? <name>org.eclipse.m2e.core.maven2Builder</name>
??? ??? </buildCommand>
??? </buildSpec>

??? <natures>
??? ??? <nature>org.eclipse.m2e.core.maven2Nature</nature>
??? </natures>

在.classpath 文件中添加

??? <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
??? ??? <attributes>
??? ??? ??? <attribute name="maven.pomderived" value="true"/>
??? ??? </attributes>
??? </classpathentry>

  相关解决方案