我在STS中导入了maven项目,当我运行更新更新项目时,我收到:
"Updating Maven Project". Unsupported IClasspathEntry kind=4
有什么解决办法吗?
我在STS中导入了maven项目,当我运行更新更新项目时,我收到:
"Updating Maven Project". Unsupported IClasspathEntry kind=4
有什么解决办法吗?
当前回答
有时,即使重新导入Maven项目也无法工作。在eclipse中正确地更新项目并不是一个确定的过程。 我发现的唯一100%安全的程序是:
Disable Maven Nature, run mvn eclipse:clean, restart, cross your fingers and Pray 3 times. If this won't work, delete the project, run mvn eclipse:clean, re-import refresh, pray and use the force. If this still doesn't work, restart Eclipse, or even better your computer. While waiting for the reboot, you can make a random donation to fix your Karma. Repeat step 2 and don't forget to pray and control your anger. Anger leads to hate. Hate leads to suffering. Try all the other answers posted in this thread. You might need to try them all for 3 times at least before giving up. Format your Computer, re-install Eclipse and Maven. No need to pray anymore, all gods hate you anyway Delete your git project, burn the physical drive that stored the remote repository, and write your project from scratch. Find a time machine, travel to the past and convince yourself to follow another, non-programming career or at least to avoid Java
其他回答
看到所有其他答案。我找到了一个更简单的方法。
我只是删除了.classpath(用eclipse编辑)中包含var的所有行,并使用maven ->更新项目而没有出现错误。
右键单击项目,选择Maven -> Remove Maven Nature。 打开你的终端,进入你的项目文件夹,执行mvn eclipse:clean 右键单击您的项目,选择“配置->转换为Maven项目”
现在你的“Unsupported IClasspathEntry kind=4 Eclipse Scala”消失了。
这个问题已经在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更新,然后使用工具进行代码覆盖。
试一试 mvn clean install eclipse:在DOS命令提示符上执行eclipse -Dwtpversion=2.0命令。 暗示你是因为,这招对我很管用!!