zoukankan      html  css  js  c++  java
  • Type cvc-complex-type.2.4.a: Invalid content was found starting with element 'build'.错误的解决方法

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

    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
    >

    这样问题就解决了。

  • 相关阅读:
    推荐:负采样
    JNDI学习总结(一)——JNDI数据源的配置
    前端性能优化
    java中的引用类型概念
    java中的各种数据类型在内存中存储的方式
    POI导出EXCEL经典实现
    synchronized 与 Lock 的那点事
    黑马程序员_Map<K,V> 映射关系 Map.Entry
    Java ConcurrentModificationException异常问题
    表 (list)
  • 原文地址:https://www.cnblogs.com/cjjjj/p/6858150.html
Copyright © 2011-2022 走看看