在maven项目中运行时出现如下错误:

点击上面的项目名,点击链接进入到报错的文件中

一般这种报错就是你的

Invalid content was found starting with element '{"http://maven.apache/POM/4.0.0":dependency}'. One of '{"http://maven.apache/POM/4.0.0":groupId, "http://maven.apache/POM/4.0.0":name, "http://maven.apache/POM/4.0.0":version, "http://maven.apache/POM/4.0.0":description, "http://maven.apache/POM/4.0.0":url, "http://maven.apache/POM/4.0.0":prerequisites, "http://maven.apache/POM/4.0.0":issueManagement, "http://maven.apache/POM/4.0.0":ciManagement, "http://maven.apache/POM/4.0.0":inceptionYear, "http://maven.apache/POM/4.0.0":mailingLists, "http://maven.apache/POM/4.0.0":developers, "http://maven.apache/POM/4.0.0":contributors, "http://maven.apache/POM/4.0.0":licenses, "http://maven.apache/POM/4.0.0":scm, "http://maven.apache/POM/4.0.0":organization, "http://maven.apache/POM/4.0.0":build, "http://maven.apache/POM/4.0.0":profiles, "http://maven.apache/POM/4.0.0":modules, "http://maven.apache/POM/4.0.0":repositories, "http://maven.apache/POM/4.0.0":pluginRepositories, "http://maven.apache/POM/4.0.0":reports, "http://maven.apache/POM/4.0.0":reporting, "http://maven.apache/POM/4.0.0":dependencyManagement, "http://maven.apache/POM/4.0.0":distributionManagement, "http://maven.apache/POM/4.0.0":properties}' is expected.

1.dependencies 标签 放错了位置还没结束就加上了</dependencies>

2.plugins节点配置错误了,格式如下

<build>
    <plugins>
        <plugins>
        </plugin>
    </plugins>
</build>

 

更多推荐

Invalid content was found starting with element ‘{“http://maven.apache.org/POM/4