Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project sms-spring-boot-starter: Fatal error compiling: 无效的标记: --release -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
时间: 2023-11-15 13:18:48 浏览: 48
这个错误提示表明在你的 Maven 项目中使用了无效的 Java 编译器参数 "--release"。这个参数是在 JDK 9 中引入的,用于指定编译的 Java 版本,但在早期的 JDK 版本中并不支持。
要解决这个问题,你可以尝试将编译器参数 "--release" 修改为支持的参数,或者将你的 JDK 版本升级到支持该参数的版本。另外,你也可以在 Maven 的编译插件中指定使用的 JDK 版本,以避免出现类似的问题。
相关问题
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
"Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:311.0:compile" 是一个 Maven 编译插件执行失败的错误信息。这个错误通常出现在使用 Maven 构建项目时,编译插件无法成功执行编译操作。
可能的原因包括:
1. 编译插件版本不兼容:你正在使用的 Maven 编译插件版本可能与你的项目或其他插件存在不兼容性。你可以尝试更新插件版本或者检查插件的配置是否正确。
2. 依赖项冲突:你的项目可能存在依赖项冲突,导致编译插件无法正确执行。你可以检查项目的依赖项,并确保它们的版本兼容性。
3. 编译错误:你的项目中可能存在编译错误,导致编译插件无法成功执行。你可以检查项目的源代码,并修复任何编译错误。
为了更准确地解决这个问题,你可以提供更多的错误信息、项目配置或者其他相关细节。
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compil
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compil是由于maven-compliler-plugin版本与maven版本不一致导致的。解决该问题有两种方法。一种是修改maven-compliler-plugin版本为3.1.0,通过在pom.xml中添加以下代码进行配置:
```
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.9</source>
<target>1.9</target>
</configuration>
</plugin>
</plugins>
</build>
```
另一种方法是在pom.xml中添加以下代码进行配置:
```
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
```