报错信息:
java.lang.RuntimeException: 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
原因:
IDEA版本与maven版本冲突
解决:
相比重装IDEA来说,还是重用maven简单些
下载链接:Index of /dist/maven/maven-3
1.IDEA 2021 兼容maven 3.8.1及之前的所用版本 2.IDEA 2020 兼容Maven 3.6.3及之前所有版本 3.IDEA 2018 兼容Maven3.6.1及之前所有版本
|