maven:升级到java 8 导致的插件报错 maven-plugin-plugin:3.2:descriptor failed: 52264

版权声明:本文为博主原创文章,转载请注明源地址。 https://blog.csdn.net/10km/article/details/81700239

最近将项目的代码JDK版本基准从jdk1.7升级到jdk1.8,在升级的过程出了一堆问题。
在重新用java 8编译一个maven插件的时候报错了:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (default-descriptor) on project swift2thrift-maven-plugin: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor failed: 52264

妈蛋,我的项目代码啥都木有改,只是换到java 8编译呀。
google上搜索一下,很快找到答案,确实与java 版本有关:升级到java 8后相应的maven插件也要升级

解决办法如下图描述,只要在pom.xml中显式的指定maven-plugin-plugin的版本号就可以了(上面的错误描述就可以看出,原本我的pom.xml中没有maven-plugin-plugin的版本号,所以使用的是默认的版本3.2):

这里写图片描述

参见 maven-plugin-plugin:descriptor goal fails at the and of file

猜你喜欢

转载自blog.csdn.net/10km/article/details/81700239