如何在 Eclipse 上修复此 Maven 警告:"There is no schema defined for this pom.xml"

How to fix this maven warning on Eclipse: "There is no schema defined for this pom.xml"

所以我有下面非常简单的pom.xml:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany</groupId>
  <artifactId>kafka-utils</artifactId>
  <version>1.1.1</version>

  <dependencies>
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka-clients</artifactId>
    <version>0.10.0.0</version>
</dependency>
  </dependencies>

</project>

但是 eclipse 在 <project> 行中给我以下警告:

There is no schema defined for this pom.xml!

见下图:

如错误提示您缺少架构声明

      <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">              
       </project>