出現(xiàn)這個(gè)問題在idea 2021中適配的過高maven,需要換低一點(diǎn)的,表示你的Maven版本配置過高,所以需要下載一個(gè)版本低的
原本用了3.9.1后來改了3.6.3
需要安裝包可以關(guān)注
問題
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
?
解決
換一個(gè)比較低點(diǎn)的版本號(hào)就可以了在idea2021中
使用指令? mvn -version可以查看自己是否配置好,需要在高級設(shè)置中設(shè)置好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中修改配置信息
這樣就配置成功了文章來源:http://www.zghlxwxcb.cn/news/detail-827136.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-827136.html
到了這里,關(guān)于在配置Maven中出現(xiàn)的問題java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.Compone的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!