An internal error occurred during: "Importing Maven projects". 错误



An internal error occurred during: "Importing Maven projects".

Unsupported IClasspathEntry kind=4


今天用eclipse把非maven项目转换为maven项目后,爆出如上错误。

在stackoverflo网站看到类似的问题

http://stackoverflow.com/questions/10564684/how-to-fix-error-updating-maven-project-unsupported-iclasspathentry-kind-4

解决方法:

In order to fix this problem, you need to do the following:

  1. Make sure that the version of the m2e(clipse) plugin that you're running is at least 1.1.0, and preferably, the latest available. The update site is the following url: http://eclipse.org/m2e/download/.

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

  3. 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 Java or other facets.

  4. 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')

翻译成中文:

1,确保你的m2e插件是最新的且可用的,至少要1.1以上的版本。

2,先让这个maven工程转换为非maven工程。方法:右键工程--maven--Disable maven nature

3,在当前目录下执行命令(就是有pom.xml文件的那个目录) —— mvn eclipse:clean

4,重新转换该工程为maven工程。右键工程--- 'Configure'--- 'Convert to Maven Project'

你可能感兴趣的:(An internal error occurred during: "Importing Maven projects". 错误)