Mavenエラーの開始致命的なエラーのコンパイル:無効なターゲットリリース



Start Maven Error Fatal Error Compiling



次のようなエラー
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project nutzbook: Fatal error compiling: invalid target release: 1.8 -> [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 Fatal error compiling: invalid target release

問題の原因:jdkjdk環境とMaven構成が同じではありません
ファイルpom.xmljdk環境構成mavenを変更できます

Pom.xmlは次のように変更されました。



<properties> <maven.compiler.source>1.8maven.compiler.source> <maven.compiler.target>1.8maven.compiler.target> properties>

またはに

<build> <plugins> <plugin> <groupId>org.apache.maven.pluginsgroupId> <artifactId>maven-compiler-pluginartifactId> <version>2.0.2version> <configuration> <source>1.8source> <target>1.8target> configuration> plugin> plugins> build>

参照リンク: http://blog.csdn.net/zhao1949/article/details/53642313






複製:https://www.cnblogs.com/powerwu/articles/10562830.html