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

"Updating Maven Project". Unsupported IClasspathEntry kind=4

有什么解决办法吗?


当前回答

这个问题(https://bugs.eclipse.org/394042)在m2e 1.5.0中得到修复,该版本可用于Eclipse Kepler和Luna:

http://download.eclipse.org/technology/m2e/releases/1.5

如果你也使用m2e-wtp,你还需要安装m2e-wtp 1.1.0:

http://download.eclipse.org/m2e-wtp/releases/luna/1.1

其他回答

这个问题已经在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条目时,它抛出此错误。

更新站点指定在以下url: http://eclipse.org/m2e/m2e-downloads.html

如果你因为任何原因不能使用m2e 1.5.0,那么:

Disable the maven nature for the project (via the right-click menu) 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.) 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')

如果更新命令用于用于Clover代码覆盖的项目,也会抛出此错误。

在此情况下解决: 取消要更新的项目文件夹。 再次运行maven更新,然后使用工具进行代码覆盖。

从开普勒升级到卢娜对我来说很管用。

我刚刚为Java 1.8支持添加了一些组件。似乎它们不像我想的那样兼容,或者是我把它们混错了。这真的引起了很多问题。尝试更新系统时报告错误,因为它们无法满足某些依赖项。Maven升级不起作用。我尝试了很多东西。

因此,如果没有理由避免升级,只需将luna存储库添加到可用的软件站点(luna http://download.eclipse.org/releases/luna/)并“检查更新”。最好所有的组件都使用相同的版本,并且有一些不错的新功能。

I tried Marco's steps but no luck. Instead if you just get the latest m2e plugin from the link he provides and one by one right click on each project -> Maven -> Update Dependencies the error still pops up but the issue is resolved. That is to say the warnings disappear in the Markers view. I encountered this issue after importing some projects into SpringSource Tool Suite (STS). When I returned to my Eclipse Juno installation the warnings were displaying. Seeing that I had m2e 1.1 already installed I tried Marco's steps to no avail. Getting the latest version fixed it however.

我无法让mvn eclipse:clean等与开普勒一起工作。

然而,我改变了创建和扩展变量,只使用eclipse类路径中的外部jar。这反映在我的.classpath中没有var。

这纠正了问题。我更新了Maven。