码迷,mamicode.com
首页 > 其他好文 > 详细

Type cvc-complex-type.2.4.a: Invalid content was found starting with element 'build'.错误的解决方法

时间:2017-05-15 21:04:00      阅读:1049      评论:0      收藏:0      [点我收藏+]

标签:oca   org   mave   invalid   iss   xml文件   osi   pom.xml   str   

项目突然间爆出了这样的问题:

Description Resource Path Location Type
cvc-complex-type.2.4.a: Invalid content was found starting with element ‘build‘. One of ‘{"http://maven.apache.org/POM/4.0.0":parent, "http://maven.apache.org/POM/4.0.0":name, "http://maven.apache.org/POM/4.0.0":description, "http://maven.apache.org/POM/4.0.0":url, "http://maven.apache.org/POM/4.0.0":prerequisites, "http://maven.apache.org/POM/4.0.0":issueManagement, "http://maven.apache.org/POM/4.0.0":ciManagement, "http://maven.apache.org/POM/4.0.0":inceptionYear, "http://maven.apache.org/POM/4.0.0":mailingLists, "http://maven.apache.org/POM/4.0.0":developers, "http://maven.apache.org/POM/4.0.0":contributors, "http://maven.apache.org/POM/4.0.0":licenses, "http://maven.apache.org/POM/4.0.0":scm, "http://maven.apache.org/POM/4.0.0":organization, "http://maven.apache.org/POM/4.0.0":profiles, "http://maven.apache.org/POM/4.0.0":modules, "http://maven.apache.org/POM/4.0.0":repositories, "http://maven.apache.org/POM/4.0.0":pluginRepositories, "http://maven.apache.org/POM/4.0.0":reports, "http://maven.apache.org/POM/4.0.0":reporting, "http://maven.apache.org/POM/4.0.0":dependencyManagement, "http://maven.apache.org/POM/4.0.0":distributionManagement}‘

is expected. pom.xml /j2eeHomework line 90 XML Problem

突然间就很崩溃啊。

后来在外文网站上找到了一个方法就把问题解决了

解决办法为:将“http://www.springmodules.org/schema/cache/springmodules-cache.xsd http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd”这段话加入到xml文件的"xmlns:xsi="的标签中

<?xml version="1.0" encoding="UTF-8"?>  
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance  
         http://www.springmodules.org/schema/cache/springmodules-cache.xsd
http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd"

xsi:schemaLocation
="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xs
>

这样问题就解决了。

Type cvc-complex-type.2.4.a: Invalid content was found starting with element 'build'.错误的解决方法

标签:oca   org   mave   invalid   iss   xml文件   osi   pom.xml   str   

原文地址:http://www.cnblogs.com/cjjjj/p/6858150.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!