1. Maven与jdk版本不一致
1.1 问题出现
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
at CustomModelValidator.<init>(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
1.2 解决方法
进入maven的历史版本界面,下载老版本3.6.3
2. 报错“Error reading file C:/Users/白马非马/Desktop/Project/Demo1/pom.xml”
你的setting,xml文件中存在语法错误文章来源:https://www.toymoban.com/news/detail-773081.html
参考文献:
IDEA 2018 2020 2021 2022 各版本对Maven版本兼容问题汇总文章来源地址https://www.toymoban.com/news/detail-773081.html
到了这里,关于Spring问题解决1:java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.Component的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!