K.O. -------- Eclipse中Maven的报错处理

来源:互联网 发布:域名备案不能有打折字 编辑:程序博客网 时间:2024/06/08 11:37

----------------------siwuxie095

  

  

  

  

  

  

  

  

K.O. -------- Eclipse 中 Maven 的报错处理

  

  

1报错一

  

A 'Maven Build' configuration with this name already exists

  

或:

  

A 'Run on Server' configuration with this name already exists

  

  

解决方法:

  

路径:workspace\.metadata\.plugins\org.eclipse.debug.core\.launches

  

进入Eclipse 的工作空间,顺着上面的路径,删除 .launches 目录下的对应

文件所有文件即可

  

  

  

  

  

2报错二

  

No compiler is provided in this environment. Perhaps you are running

on a JRE rather than a JDK?

  

「即 Maven 项目的编译需要 JDK」

  

  

解决方法:

  

打开Eclipse,Window->Preferences->Java->Installed JREs,

点击 Add,配置jdk

  

  

  

而原来的jre 则是:

  

  

  

这样一来,勾选上jdk 即可

  

  

  

  

  

  

3报错三

  

invalid LOC header (bad signature)

  

  

解决方法:

  

这是因为jar 包没有被正确的下载,从本地仓库找到对应 jar 包,将之删除,

Maven 重新下载即可。具体:选择项目名,右键->Maven->Update

  

  

  

  

  

4报错四

  

Exception occurred during processing request: Unable to compile class

for JSP

  

  

解决方法:

  

不再使用Maven 默认的 tomcat-maven-plugin 插件,改用

tomcat6-maven-plugintomcat7-maven-plugin插件

  

  

  

  

  

  

  

  

  

  

【made by siwuxie095】

原创粉丝点击