小工具知识网

当前位置: 首页 > 行业知识 > 在配置Maven中出现的问题java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.Compone

行业知识

在配置Maven中出现的问题java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.Compone

2026-12-05 11:01:00 来源:互联网转载

出现这个问题在idea 2021中适配的过高maven,需要换低一点的,表示你的Maven版本配置过高,所以需要下载一个版本低的

原本用了3.9.1后来改了3.6.3

需要安装包可以关注

问题

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 ()' not found

  at CustomModelValidator.(CustomModelValidator.java:36)

  while locating CustomModelValidator

  at ClassRealm[maven.ext, parent: ClassRealm[plexus.core, parent: null]]

      \_ installed by: WireModule -> PlexusBindingModule

  while locating ModelValidator annotated with @Named(value="ide")

Learn more:

  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

1 error

======================

Full classname legend:

======================

CustomModelValidator:  "org.jetbrains.idea.maven.server.embedder.CustomModelValidator"

DefaultModelValidator: "org.apache.maven.model.validation.DefaultModelValidator"

ModelValidator:        "org.apache.maven.model.validation.ModelValidator"

Named:                 "com.google.inject.name.Named"

PlexusBindingModule:   "org.eclipse.sisu.plexus.PlexusBindingModule"

WireModule:            "org.eclipse.sisu.wire.WireModule"

========================

End of classname legend:

========================

      role: org.apache.maven.model.validation.ModelValidator

  roleHint: ide

 

解决

换一个比较低点的版本号就可以了在idea2021中

使用指令  mvn -version可以查看自己是否配置好,需要在高级设置中设置好bin路径

下载低版本的Maven,这里推荐下载Maven3.6.3版本,下载连接为https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip

别忘记在setting中修改配置信息

这样就配置成功了

 

上一篇:怎么进ctd服务器?

下一篇:服务器故障后怎么恢复?