我在STS中导入了maven项目,当我运行更新更新项目时,我收到:
"Updating Maven Project". Unsupported IClasspathEntry kind=4
有什么解决办法吗?
我在STS中导入了maven项目,当我运行更新更新项目时,我收到:
"Updating Maven Project". Unsupported IClasspathEntry kind=4
有什么解决办法吗?
当前回答
你有没有试过:
如果您有导入项目到eclipse 4,请删除它。 在maven consol中,运行:mvn eclipse:clean Eclipse 4: File -> Import -> Maven ->现有Maven项目
其他回答
我尝试了这里提到的所有步骤和类似的问题,但不能解决这个问题。我既不能解决问题,也不能更新我的m2eclipse。所以我安装了Eclipse Luna,它解决了我的问题……尽管这意味着我必须花45分钟来配置我的工作空间中的所有环境。
看到所有其他答案。我找到了一个更简单的方法。
我只是删除了.classpath(用eclipse编辑)中包含var的所有行,并使用maven ->更新项目而没有出现错误。
这个问题已经在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')
我使用Eclipse 4.3.2 (Kepler)和M2E 1.4。X和摸索了好几次这个问题!
在我的情况下,“mvn eclipse:eclipse”命令还生成Checkstyle, PMD和Findbugs配置,所以“mvn eclipse:clean”对我没有帮助,因为它会再次删除所有这些配置文件。
对我来说,最好的解决办法就是删除所有。”类路径”文件:
find . -name ".classpath" -delete
然后将项目导入eclipse。
在导入项目之前,应该将其转换为eclipse项目 MVN eclipse: eclipse 然后我发现以下错误。 在“导入Maven项目”期间发生了内部错误。不支持的IClasspathEntry kind=4
其中是M2E不识别并因此抛出错误的值kind = "var"。
现在输入这个。 MVN eclipse:干净
现在在eclipse中刷新项目或重新导入。