maven 错误
2016-07-06 00:00
337 查看
摘要: 导入maven项目出现 Unsupported IClasspathEntry kind=4 错误
eclipse 官网给的解决方法是这样的:
这个异常会导致项目无法使用eclipse4.2的maven功能,我升级了maven的版本还是不行
英文解释如下:
Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=374332#c14
The problem is caused by the fact that the STS (the Spring IDE/Eclipse) uses the m2e(clipse) plugin but that eclipse:eclipse has been probably been run on the project. When m2e encounters a "var" .classpath entry, it throws this error.
In order to fix this problem, you need to do 2 things:
Make sure that the version of the m2e(clipse) plugin that you're running is at least 1.1.0. The update site is here: https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.1.0/N/LATEST/
Disable the maven nature for the project (via the right-click menu), run mvn eclipse:clean (while your project is open in STS/eclipse), and then re-enable the maven nature.
中文解释就是
问题是因为使用spring ide使用了m2eclipse 插件,但是这个插件的使用前提是不允许命令 mvn eclipse:eclipse在项目上执行过,如果执行过,就会抛出这个异常。
现阶段修复这个问题需要做两件事
1、保证m2e插件的版本高于 1.1.0,如果没有到站点升级 :https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.1.0/N/LATEST/
2、去掉项目的maven特性,右键菜单就能去除,然后执行 mvn eclipse:clean,重新引入maven工程,不是java项目。
其实这种解决方法大部分情况可以解决问题,但是有时候如果我们使用mvn命令进行打包后,会出现classpath内容被修改了,整个maven工程被修改为java工程的classPath。即classpath中没有maven 依赖配置了,如下图:
正确的maven 工程classpath应该为:
如果出现上面的情况,我们只需要删除第一个图中 var 开头的所有classpath配置,然后进行 mavne update 或者先将maven工程失效,然后在convert 为maven工程,即可。
eclipse 官网给的解决方法是这样的:
Unsupported IClasspathEntry kind=4
这个异常会导致项目无法使用eclipse4.2的maven功能,我升级了maven的版本还是不行
英文解释如下:
Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=374332#c14
The problem is caused by the fact that the STS (the Spring IDE/Eclipse) uses the m2e(clipse) plugin but that eclipse:eclipse has been probably been run on the project. When m2e encounters a "var" .classpath entry, it throws this error.
In order to fix this problem, you need to do 2 things:
Make sure that the version of the m2e(clipse) plugin that you're running is at least 1.1.0. The update site is here: https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.1.0/N/LATEST/
Disable the maven nature for the project (via the right-click menu), run mvn eclipse:clean (while your project is open in STS/eclipse), and then re-enable the maven nature.
中文解释就是
问题是因为使用spring ide使用了m2eclipse 插件,但是这个插件的使用前提是不允许命令 mvn eclipse:eclipse在项目上执行过,如果执行过,就会抛出这个异常。
现阶段修复这个问题需要做两件事
1、保证m2e插件的版本高于 1.1.0,如果没有到站点升级 :https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.1.0/N/LATEST/
2、去掉项目的maven特性,右键菜单就能去除,然后执行 mvn eclipse:clean,重新引入maven工程,不是java项目。
其实这种解决方法大部分情况可以解决问题,但是有时候如果我们使用mvn命令进行打包后,会出现classpath内容被修改了,整个maven工程被修改为java工程的classPath。即classpath中没有maven 依赖配置了,如下图:
正确的maven 工程classpath应该为:
如果出现上面的情况,我们只需要删除第一个图中 var 开头的所有classpath配置,然后进行 mavne update 或者先将maven工程失效,然后在convert 为maven工程,即可。
相关文章推荐
- pInvokeStackImbalance 调试异常的解决办法。
- C#和C++混合编程
- c++ 生成pdf
- libharu(1):windows下编译方法
- 上下左右滚动插件
- nginx的启动、停止、平滑重启
- 证件识别接口PHP调用示例
- 证件识别接口JAVA调用示例
- JAVA实现复制文件
- JAVA打开指定网页
- C++ json string 发送之 base64
- 少干爹的 d语言的总结
- 图片以base64方式展示
- 架构漫谈:UML中几种类间关系:继承、实现、依赖、关联、聚合、组合的联系与区别
- iOS第三方星级视图控件——HCSStarRatingView
- php连接数据库
- 【杭电oj】5246 - 超级赛亚ACMer(二分 & 贪心 & STL)
- Android BaseAdapter的极简封装
- 浅谈事件代理
- Python Pandas 分析郁达夫《故都的秋》