Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java M2Eclipse:如何避免M2E在maven更新工作区中的项目时更改我的类路径_Java_Eclipse Plugin_M2eclipse - Fatal编程技术网

Java M2Eclipse:如何避免M2E在maven更新工作区中的项目时更改我的类路径

Java M2Eclipse:如何避免M2E在maven更新工作区中的项目时更改我的类路径,java,eclipse-plugin,m2eclipse,Java,Eclipse Plugin,M2eclipse,我正在做一些eclipse插件开发,我已经生成了我的定制类路径,比如,但是当我右键单击->maven->maven update项目时,它(M2E)将覆盖我的类路径,如下所示: <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/webapp"> <attributes> <attribute name="maven.

我正在做一些eclipse插件开发,我已经生成了我的定制类路径,比如
,但是当我右键单击->maven->maven update项目时,它(M2E)将覆盖我的类路径,如下所示:

<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/webapp">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>

事实上,这会给我的生意带来很多问题。有没有办法配置或代码注入以避免更改?感谢您的帮助

pom(项目对象模型)的目的是有一个中心位置来包含关于构建/类路径的所有信息。更新maven项目时,pom.xml文件的信息将更新/覆盖.classpath文件

=>不要手动更改.classpath文件,而是将信息包含在pom.xml文件中

对于eclipse插件,您可能希望删除项目的maven特性,因为eclipse插件有自己定义依赖项的方法,请参见MANIFEST.MF