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'

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值