且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法使用带有错误的MAVEN构建 - 无法执行目标org.apache.maven.plugins:maven-compiler-plugin:3.1:compile

更新时间:2022-02-22 17:21:35

您的Maven正在阅读Java版本1.6.0_65,其中pom.xml表示版本为1.7。

Your Maven is reading Java version as 1.6.0_65, Where as the pom.xml says the version is 1.7.

尝试安装所需的版本。

如果已经安装检查你的$ JAVA_HOME环境变量,它应该包含Java JDK 7的路径。如果你没找到它,修复你的环境变量。

If already installed check your $JAVA_HOME environment variable, it should contain the path of Java JDK 7. If you dont find it, fix your environment variable.

也删除行

 <fork>true</fork>
     <executable>${JAVA_1_7_HOME}/bin/javac</executable>

来自 pom.xml