如何去掉There is no schema defined for this pom.xml.警告

发表于: java/j2ee | 作者: darkmi | 日期: 2011/03/15 08:00
标签: maven, pom.xml
字号:

pom.xml文件中有如下警告:

There is no schema defined for this pom.xml. Code completion will not work without a schema defined.

解决方法:
将pom.xml文件中的根标签

<project>

替换为:

<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">

即可。

关于这个问题的一个讨论:
https://issues.sonatype.org/browse/MNGECLIPSE-1770

切换主题切换主题
返回顶部