我是这个错误的新手,它突然出现并破坏了我的项目。任何机构都可以帮助我解决这个错误:
[ERROR] Error executing Maven. [ERROR] > com.google.inject.ProvisionException: Guice provision errors: > > 1) Error injecting: org.apache.maven.DefaultMaven at >
ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, >
parent: null] while locating org.apache.maven.Maven > > 1 error >
role: org.apache.maven.Maven roleHint: [ERROR] Caused by: Guice
provision errors: > > 1) Error injecting:
org.apache.maven.DefaultMaven at > ClassRealm[plexus.core, parent:
null] at ClassRealm[plexus.core, > parent: null] while locating
org.apache.maven.Maven > > 1 error [ERROR] Caused by: Guice provision errors: > > 1) Error injecting:
org.apache.maven.project.DefaultProjectBuilder > at
ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, >
parent: null] while locating org.apache.maven.project.ProjectBuilder while locating org.apache.maven.DefaultMaven > > 1 error [ERROR] Caused by: Lorg/sonatype/aether/impl/ArtifactResolver; > [ERROR] Caused by: org.sonatype.aether.impl.ArtifactResolver
最佳答案
发生此错误的原因很可能是您使用了与 maven 3.1 不兼容的插件。由于 3.1 版 maven 依赖于 eclipse Aether 而不是 sonatype Aether - 查看 Release Notes .
为避免该错误,您应该使用 maven 3.0.5 或尽可能更新您的插件(请参阅已修复插件列表 here)。
关于maven - 执行 Maven 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18445495/