Eclipse Maven 插件升级后classpath配置的变化

Eclipse 插件从 Maven Integration for Eclipse 0.12.1.20110112-1712升级到Maven Integration for Eclipse 1.0.100.20110804-1717后,需要更改.classpath中关于maven的应用。具体如下

旧版本

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>

新版本
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">

所以为了解决这种不兼容,需要修改

项目中.classpath的mavne版本

即把org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER改成org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER

以及.project文件中的

<buildCommand>
            <name>org.maven.ide.eclipse.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>

改成

<buildCommand>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>

以及

<nature>org.maven.ide.eclipse.maven2Nature</nature>

改成

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

猜你喜欢

转载自kfcman.iteye.com/blog/2063861