如何在Eclipse上修复此maven警告:"没有为此pom.xml定义架构"

Tak*_*oUp 3 eclipse pom.xml maven

所以我有一个非常简单的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>
Run Code Online (Sandbox Code Playgroud)

但eclipse给了我以下警告<project>:

There is no schema defined for this pom.xml!
Run Code Online (Sandbox Code Playgroud)

见下图:

在此输入图像描述

Kla*_*aja 7

就像错误说你缺少架构声明

  <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>
Run Code Online (Sandbox Code Playgroud)