maven项目导入eclipse 错误提示:cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependency'.
导入写好的maven项目,pom.xml报错:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'dependency'. One of '{"http://
maven.apache.org/POM/4.0.0":parent, "http://maven.apache.org/POM/4.0.0":description, "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":build, "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":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, "http://maven.apache.org/POM/4.0.0":properties}' is expected.
问题代码:<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请把完整的pom.xml贴出来,这样看不出来,感觉是开头的XSD错误: