Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 未能执行目标org.apache.maven.plugins:maven编译器plugin:2.3.2_Java_Maven - Fatal编程技术网

Java 未能执行目标org.apache.maven.plugins:maven编译器plugin:2.3.2

Java 未能执行目标org.apache.maven.plugins:maven编译器plugin:2.3.2,java,maven,Java,Maven,我知道这是因为我的~/.m2/存储库中有一个或多个jar文件损坏,但我无法确定哪些jar文件已损坏,或者哪些jar需要删除并重新下载 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:2.3.2:compile (default-compile) on project CRUDWebAppMavenized: Execution default-compil

我知道这是因为我的~/.m2/存储库中有一个或多个jar文件损坏,但我无法确定哪些jar文件已损坏,或者哪些jar需要删除并重新下载

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-                 plugin:2.3.2:compile (default-compile) on project CRUDWebAppMavenized: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main :     Unsupported major.minor version 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-compiler-plugin:2.3.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/hp/.m2/repository/org/apache/maven/plugins/maven-   compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar
[ERROR] urls[1] = file:/C:/Users/hp/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
[ERROR] urls[2] = file:/C:/Users/hp/.m2/repository/org/codehaus/plexus/plexus-compiler-api/1.8.1/plexus-compiler-api-1.8.1.jar
[ERROR] urls[3] = file:/C:/Users/hp/.m2/repository/org/codehaus/plexus/plexus-compiler-   manager/1.8.1/plexus-compiler-manager-1.8.1.jar
[ERROR] urls[4] = file:/C:/Users/hp/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/1.8.1/plexus-compiler-javac-1.8.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]] 

你使用哪个Maven版本?哪个Java版本?('Unsupported major.minor version 52.0')?@khmarbaise嗯,当我将maven编译器插件的maven依赖项更新到其最新版本时,我的问题得到了解决,即在pom.xml中将版本从2.3.2更改为3.1。它现在成功地构建在Java7和Java8上。对于maven,我正在使用最新的m2e eclipse插件。您更新了maven编译器插件的依赖项吗?为什么不更新maven编译器插件本身呢?你更新了哪个依赖项?@khmarbaise我是说,我将maven编译器插件本身更新到了最新版本。所有其他maven编译器插件依赖项显然都是自动更新的。Ok。谢谢你把它清理干净。