我想建立项目,但是出现以下错误:
在 messaging-utils-core 项目上执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) 失败: 编译致命错误:无效的目标版本:11
我已经通过谷歌搜索等各种方式尝试进行修复,但是在本地中并没有成功。 我正在使用 Eclipse。
这是我的 pom.xml 文件的样子:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>sg.com.nets.utils</groupId>
<artifactId>messaging-utils-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>messaging-utils-core</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>sg.com.nets.common.faulttolerance</groupId>
<artifactId>fault-tolerance-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.solacesystems</groupId>
<artifactId>sol-jcsmp</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>qpid-jms-client</artifactId>
</dependency>
</dependencies>
我运行mvn --version命令,它会显示以下信息:
Apache Maven 3.6.3
Java version: 1.8.0_281
对于我的环境,我有以下内容:
JAVA_HOME = D:\pathlocation\jdk1.8.0_281
请帮助我解决这个问题,我已经尝试了好几天还没有解决。谢谢。