idea 引入包报错:Unable to provision, see the following errors

报错:

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 'void <init>()' 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

1、修改.mvn配置

修改.mvn下文件maven-wrapper.properties中idea版本配置为适配版本

2、修改默认maven位置

idea默认安装maven在C:\Users\用户名\.m2\wrapper\dists文件夹下,环境变量下指定mvn版本

你可能感兴趣的:(#,spring,boot入门,intellij-idea,java,maven)