企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
##### IDEA打开之后,maven同步依赖时,报如下的错误: IDEA Maven工程报错 ``` 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 ``` > 解决办法 解决方法已实测可行,打开项目目录下`.mvn/wrapper/maven-wrapper.properties`文件,修改其中的第一行 ``` distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip ``` 修改为 ``` distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip ``` 即降低maven版本,然后重新reload项目,错误消失。