问题:IDEA中maven更新失败
现象:报错:
Caused by: java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) [Guice/ErrorInjectingConstructor]: NoSuchMethodError: DefaultModelValidator: method 'void <init>()' not found
解决方法:
1.查看自己的idea版本:
Help–About
2.由上图可知IDEA 为2021.1版本 ,是2021年4月6日发布
3.查看idea设置的maven版本为3.9.3.是2023年6月发布的
如何查看maven版本发布时间
4.IDEA在设置高版本的maven时不能完全兼容。替换2021.1之前的maven版本即可。我用的是maven3.6.3