Bug01
描述:Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-3.1.xsd). For more information, right click on the message in the Problems View and
select "Show Details..."
处理:把project菜单里的clean点击一下就OK了,或者 将 Preferences > XML > XML Files > Validation中"Honour all XML schema locations"前的对号去掉。它将禁用指向不同schema位置相同命名空间引用的验证,仅以第一次找到的可验证的XML文件为结果。
Bug02
描述:
我把另外一台电脑上的正常的maven项目导入到我自己的myeclipse中时出现下面错误,不知道怎么回事,请大神指点:CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (http://repo1.maven.org/maven2): null to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom
处理:
1、确认你电脑上MyEclipse有配置maven;
2、配置了maven,查看你maven的setting.xml,看看你的资源中央库的路径是否正确。
3.maven-compiler-plugin:2.3.2 或者 它的依赖 找不到。应该是 maven 没有正确配置
Bug03
描述:
处理:
解决方案:
首先,将webapp下的web.xml文件
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- <!DOCTYPE web-app 3 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 4 "http://java.sun.com/dtd/web-app_2_3.dtd">
替换为
1 <web-app xmlns="http://java.sun.com/xml/ns/javaee" 2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 4 http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 5 version="3.0"> 6 <display-name>Archetype Created Web Application</display-name> 7 </web-app>
然后,关闭Eclipse,改项目下的.settings\org.eclipse.wst.common.project.facet.core.xml,将 版本改成为3.0,将成后是<installed facet="jst.web" version="3.0"/>,再启动Eclipse.
最后,在Problems View的出错提示右键选Quick Fix,再按提示确定就OK;或者,右键项目->Maven->Update Project
=====================
此时,问题一般解决。如还不能解决,尝试在pom.xml中加入如下代码,然后再maven--update project:
1 <build> 2 <finalName>chm</finalName> 3 <plugins> 4 <plugin> 5 <artifactId>maven-compiler-plugin</artifactId> 6 <version>2.0.2</version> 7 <configuration> 8 <source>1.6</source> 9 <target>1.6</target> 10 </configuration> 11 </plugin> 12 </plugins> 13 </build>