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

标签 eclipse maven 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!

见下图:

enter image description here

最佳答案

就像错误表明您缺少架构声明

      <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> 

关于eclipse - 如何修复 Eclipse 上的此 Maven 警告 : "There is no schema defined for this pom.xml",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37489985/

相关文章:

java - Maven SQL插件: execute scripts conditionally

java - 尝试在maven的pom.xml中添加插件

java - 如何将 javafx 正确导入 eclipse? ("The import cannot be resolved")

java - 某些 JPanel 未显示在我的 CardLayout 面板中

java - 具有单个 war 文件的 Spring 多模块项目,其中所有模块仅依赖于公共(public)模块

java - 无法在部署到 Heroku 的 Java Tomcat 服务器中执行工作进程

java - 在 cmd 中使用 Eclipse Java 项目运行外部 jar

java - 如何更改计算器上的结果 "0"?

java - 假装REST客户端: FactoryBean threw exception on object creation

scala - 动态maven artifactId