本人电脑环境:jdk1.8,idea2021,maven 3.6.3
问题:今天调整maven项目的三个配置参数后,idea报了下面的错误
org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator: method <init>()V not found
at org.jetbrains.idea.maven.server.embedder.CustomModelValidator.<init>(Unknown Source)
while locating org.jetbrains.idea.maven.server.embedder.CustomModelValidator
at ClassRealm[maven.ext, parent: ClassRealm[plexus.core, parent: null]] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
while locating org.apache.maven.model.validation.ModelValidator annotated with @com.google.inject.name.Named(value="ide")
1 error
role: org.apache.maven.model.validation.ModelValidator
roleHint: ide
解决办法:其实这是maven版本太高的原因导致的,换个第版本的maven,我之前是用maven3.8.7,现在使用了3.6.3。
然后去setting里面搜索maven配置低版本maven的三个参数,不过会报如下的错误
不用担心,重启idea后这个错误就会消失。
完美解决!
标签:exception,repository,plexus,idea,maven,报错,org,codehaus From: https://www.cnblogs.com/malinyan/p/17075833.html