<目次>
(1) Failed to execute goal org.apache.mavenエラーの原因と対処(Spring BootのMavenプロジェクトで発生)
(1-1) エラー内容①
(1-2) 原因①/対処①
(1-3) エラー内容②
(1-4) 原因②/対処②
(1) Failed to execute goal org.apache.mavenエラーの原因と対処(Spring BootのMavenプロジェクトで発生)
本記事ではSpring Bootで作成したMavenプロジェクトをmvnwシェルで起動する際に発生したエラーの対処記録です。
(1-1) エラー内容①
$ ./mvnw spring-boot:run
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project spring-boot-restapi-sample: Fatal error compiling: 11は無効なターゲット・リリースです -> [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. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
(1-2) 原因①/対処①
<properties> <java.version>11</java.version> </properties>
<properties> <java.version>1.8</java.version> </properties>
●(補足)修正値が分からない場合
$ java -version
java version "1.8.0_231" Java(TM) SE Runtime Environment (build 1.8.0_231-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
●(補足)修正方法が分からない場合
(1-3) エラー内容②
[ERROR] No plugin found for prefix 'sprint-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/admin/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [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. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException [admin@ik1-336-28337 spring-boot-restapi-sample]$