com.google.inject.ProvisionException: Guice provision errors问题解决

Failed to execute goal net.bytebuddy:byte-buddy-maven-plugin:1.9.4:transform (default) on project 问题解决

在编译一个java工程的时候,遇到这个错误:
[ERROR] Failed to execute goal net.bytebuddy:byte-buddy-maven-plugin:1.9.4:transform (default) on project alliance-dsvs-server: Execution default of goal net.bytebuddy:byte-buddy-maven-plugin:1.9.4:transform failed: Unable to load the mojo ‘transform’ (or one of its required components) from the plugin ‘net.bytebuddy:byte-buddy-maven-plugin:1.9.4’: com.google.inject.ProvisionException: Guice provision errors:
[ERROR]
[ERROR] 1) No implementation for org.eclipse.aether.RepositorySystem was bound.
[ERROR] while locating net.bytebuddy.build.maven.ByteBuddyMojo F o r P r o d u c t i o n T y p e s [ E R R O R ] a t C l a s s R e a l m [ p l u g i n > n e t . b y t e b u d d y : b y t e − b u d d y − m a v e n − p l u g i n : 1.9.4 , p a r e n t : s u n . m i s c . L a u n c h e r ForProductionTypes [ERROR] at ClassRealm[plugin>net.bytebuddy:byte-buddy-maven-plugin:1.9.4, parent: sun.misc.Launcher ForProductionTypes[ERROR]atClassRealm[plugin>net.bytebuddy:bytebuddymavenplugin:1.9.4,parent:sun.misc.LauncherAppClassLoader@4e25154f]
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=net.bytebuddy:byte-buddy-maven-plugin:1.9.4:transform)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: net.bytebuddy:byte-buddy-maven-plugin:1.9.4:transform
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

解决办法

定位后猜测跟maven版本过低有关,使用的mavne版本为3.0.5;
升级到最新的3.6.3后问题解决。

  1. 升级也就是重新安装最新的3.6.3。 参考文档:
    https://blog.csdn.net/cpongo3/article/details/90603205

补充说明(20200807)

问题说明

该问题可能多种原因,上次的方案恰好能解决上次的问题。
本次,又遇到了这个问题,解决方案跟上次不一样。这次是通过更改maven的settings.xml文件解决的。但是仍然不完善,只解决了部分问题。

方案描述

jenkins平台上maven settings.xml中在repository部分按照顺序定义了4个私服库repository,分别是release,snapshot,public和thirdparty。 而开发的maven settings.xml在repository部分只定义了public一个私服库。
但是很奇怪,在清理掉jenkins 本地的 m2/repository后,重新从私服库下载依赖包后,就遇到‘net.bytebuddy:byte-buddy-maven-plugin:1.9.4’的错误; 而使用开发的settings.xml就能够编译成功,没有任何错误。
对比了一下,两者能够下载的依赖包,4个私服库的反倒不如1个私服库的全。 原因还在调查中。

但是初步通过这个方式解决了一个项目的编译打包需求。

不过另一个项目编译,使用这个配置又出现了问题,无奈之下,2个项目使用2个不同的settings.xml。

对于这个问题只能进一步研究,但可以明确的是,这个问题的本质应该是依赖包下载不全导致的。具体原因只能挨个排查。我还在继续跟踪这个问题的解决方案。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值