【发布时间】:2021-01-20 12:44:39
【问题描述】:
我在尝试配置 pom xml 以开始构建项目时遇到此错误,但我不知道如何修复。我很努力,删除和添加字符,但我没有成功。 看来,问题出在“插件”上。
有人给点小费吗?
提前谢谢你!
这是我的 pom 文件:
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.Dev2021</groupId>
<artifactId>aula-configurando-o-spring-framework</artifactId>
<version>1.0-SNAPSHOT</version>
<name>aula-configurando-o-spring-framework</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.7.RELEASE</version>
</dependency>
</dependencies>
<build/>
<plugins/>
<plugin/>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.3</version>
<configuration/>
<source>1.14</source>
<target>1.14</target>
<configuration/>
<plugin/>
<plugins/>
<build/>
</project>
【问题讨论】:
-
检查所有带有斜线的开始和结束标签。示例:开头
<build/>应为<build>,结尾<build/>应为</build>。此外,Java 14 是14而不是1.14。这些类型的问题应该会为您提供具体和相关的错误消息 - 所以还有其他事情发生。 -
谢谢! @andrewjames。我试过了,但仍然有错误。编译器需要一些我不知道它是什么的东西。 spring context 和 maven 的版本变“红色”,表示有问题。
标签: java maven plugins pom.xml