如何修复错误“更新Maven项目”。不支持的IClasspathEntry种类= 4? [英] How to fix error "Updating Maven Project". Unsupported IClasspathEntry kind=4?

查看:136
本文介绍了如何修复错误“更新Maven项目”。不支持的IClasspathEntry种类= 4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在STS中导入了maven项目,当我运行更新更新项目时,我收到:

 更新Maven项目。不支持的IClasspathEntry种类= 4 

有没有解决方法?

解决方案

这个问题已经在m2e 1.5.0中得到修复,可用于Eclipse Kepler(4.3)和Luna(4.4) >

请参阅 https:/ /bugs.eclipse.org/bugs/show_bug.cgi?id=374332#c14



问题是由STS(Spring IDE / Eclipse)以及Eclipse和其他基于Eclipse的IDE,使用m2e(clipse)插件,但是eclipse:eclipse可能已经在项目上运行了。当m2e遇到var.classpath条目时,会引发此错误。



更新网站在以下网址中指定:_
http://eclipse.org/m2e/m2e-downloads.html



如果您不能使用m2e 1.5.0由于任何原因,然后:


  1. 禁用项目的maven属性(通过右键单击菜单)


  2. 运行 mvn eclipse:clean (当你的项目是打开 STS /蚀)。根据时间的不同,您可能需要在重新启用maven性质之前,先对项目进行刷新或更新。你应该能够看到你的项目已经失去了它的Maven性质。 ( eclipse:clean 目标只是删除 .project .classpath .settings / 文件/目录,您也可以删除这些文件(在项目打开时再次 )而不是运行 mvn eclipse:clean 。)


  3. 重新启用maven属性。

    (大多数情况下,可以在软件包资源管理器窗格中右键单击相关项目,然后选择配置 - >转换为Maven项目)。



I have imported maven project in STS, when I run update update project I receive:

"Updating Maven Project". Unsupported IClasspathEntry kind=4

Is there a workaround for this?

解决方案

This issue has been fixed in m2e 1.5.0 which is available for Eclipse Kepler (4.3) and Luna (4.4)

Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=374332#c14

The problem is caused by the fact that STS (the Spring IDE/Eclipse), as well Eclipse and other Eclipse based IDE's, use the m2e(clipse) plugin but that eclipse:eclipse has been probably been run on the project. When m2e encounters a "var" .classpath entry, it throws this error.

The update sites are specified at the following url:
http://eclipse.org/m2e/m2e-downloads.html

If you can't use m2e 1.5.0 for any reason, then :

  1. Disable the maven nature for the project (via the right-click menu)

  2. Run mvn eclipse:clean (while your project is open in STS/eclipse). Depending on the timing, you might need to do a refresh or two on the project before re-enabling the maven nature. You should be able to see that your project has lost it's Maven nature. (The eclipse:clean goal just deletes the .project, .classpath and .settings/ files/directories. You can also just remove those files (again while the project is open) instead of running mvn eclipse:clean.)

  3. Re-enable the maven nature.
    (Most of the time, this can be done by right-clicking on the project in question in the package explorer pane, and then choosing 'Configure'-> 'Convert to Maven Project')

这篇关于如何修复错误“更新Maven项目”。不支持的IClasspathEntry种类= 4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆