“Can not set org.eclipse.aether.spi.log.Logger” wi

2020-08-09 09:11发布

问题:

I have written a small custom maven plugin, and it runs fine.. most of the time.

When using it, it's configured to run on test phase, and I see it executing, no problem. Now problem comes later, when I do mvn clean install or mvn clean deploy in the project using the plugin : it fails with a message I can't make sense of. And it clearly comes from my plugin, because if I remove it, then mvn clean install works.

Error message is very long and it has 4 similar traces as the one below.

I am quite clueless with where it can come from.. any idea ?

 Error injecting: private org.eclipse.aether.spi.log.Logger org.apache.maven.repository.internal.DefaultVersionResolver.logger
[ERROR] while locating org.apache.maven.repository.internal.DefaultVersionResolver
[ERROR] while locating java.lang.Object annotated with *
[ERROR] at org.eclipse.sisu.wire.LocatorWiring
[ERROR] while locating org.eclipse.aether.impl.VersionResolver
[ERROR] for parameter 2 at org.eclipse.aether.internal.impl.DefaultArtifactResolver.<init>(Unknown Source)
[ERROR] while locating org.eclipse.aether.internal.impl.DefaultArtifactResolver
[ERROR] while locating java.lang.Object annotated with *
[ERROR] at org.eclipse.sisu.wire.LocatorWiring
[ERROR] while locating org.eclipse.aether.impl.ArtifactResolver
[ERROR] for parameter 2 at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.<init>(Unknown Source)
[ERROR] while locating org.apache.maven.repository.internal.DefaultArtifactDescriptorReader
[ERROR] while locating java.lang.Object annotated with *
[ERROR] at org.eclipse.sisu.wire.LocatorWiring
[ERROR] while locating org.eclipse.aether.impl.ArtifactDescriptorReader
[ERROR] for parameter 1 at org.eclipse.aether.internal.impl.DefaultDependencyCollector.<init>(Unknown Source)
[ERROR] while locating org.eclipse.aether.internal.impl.DefaultDependencyCollector
[ERROR] while locating java.lang.Object annotated with *
[ERROR] at org.eclipse.sisu.wire.LocatorWiring
[ERROR] while locating org.eclipse.aether.impl.DependencyCollector
[ERROR] for parameter 5 at org.eclipse.aether.internal.impl.DefaultRepositorySystem.<init>(Unknown Source)
[ERROR] while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
[ERROR] while locating java.lang.Object annotated with *
[ERROR] while locating org.apache.maven.artifact.installer.DefaultArtifactInstaller
[ERROR] at ClassRealm[plexus.core, parent: null] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] at ClassRealm[plexus.core, parent: null] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.artifact.installer.ArtifactInstaller
[ERROR] while locating org.apache.maven.plugin.install.InstallMojo
[ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-install-plugin:2.4, parent: sun.misc.Launcher$AppClassLoader@5c647e05] (via modules: org.eclipse.sisu.wire.Wir
eModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.apache.maven.plugins:maven-install-plugin:2.4:install)
[ERROR] Caused by: java.lang.IllegalArgumentException: Can not set org.eclipse.aether.spi.log.Logger field org.apache.maven.repository.internal.DefaultVersionResolver.log
ger to org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory
[ERROR] at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
[ERROR] at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
[ERROR] at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)
[ERROR] at java.lang.reflect.Field.set(Field.java:758)
[ERROR] at org.eclipse.sisu.bean.BeanPropertyField.set(BeanPropertyField.java:72)
[ERROR] at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty(ProvidedPropertyBinding.java:48)
[ERROR] at org.eclipse.sisu.bean.BeanInjector.injectMembers(BeanInjector.java:52)
[ERROR] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:140)
[ERROR] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:117)
[ERROR] at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
[ERROR] at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
[ERROR] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
[ERROR] at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
[ERROR] at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
[ERROR] at org.eclipse.sisu.wire.BeanProviders.firstOf(BeanProviders.java:179)
[ERROR] at org.eclipse.sisu.wire.BeanProviders$7.get(BeanProviders.java:160)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
[ERROR] at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
[ERROR] at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
[ERROR] at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
[ERROR] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
[ERROR] at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
[ERROR] at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
[ERROR] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
[ERROR] at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
[ERROR] at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
[ERROR] at org.eclipse.sisu.wire.BeanProviders.firstOf(BeanProviders.java:179)
[ERROR] at org.eclipse.sisu.wire.BeanProviders$7.get(BeanProviders.java:160)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
[ERROR] at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
[ERROR] at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
[ERROR] at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
[ERROR] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
[ERROR] at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
[ERROR] at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
[ERROR] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
[ERROR] at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
[ERROR] at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
[ERROR] at org.eclipse.sisu.wire.BeanProviders.firstOf(BeanProviders.java:179)
[ERROR] at org.eclipse.sisu.wire.BeanProviders$7.get(BeanProviders.java:160)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
[ERROR] at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
[ERROR] at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
[ERROR] at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
[ERROR] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
[ERROR] at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
[ERROR] at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
[ERROR] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
[ERROR] at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
[ERROR] at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
[ERROR] at org.eclipse.sisu.wire.BeanProviders.firstOf(BeanProviders.java:179)
[ERROR] at org.eclipse.sisu.wire.BeanProviders$7.get(BeanProviders.java:160)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
[ERROR] at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
[ERROR] at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
[ERROR] at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
[ERROR] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
[ERROR] at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
[ERROR] at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
[ERROR] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
[ERROR] at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
[ERROR] at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
[ERROR] at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
[ERROR] at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get(PlexusRequirements.java:250)
[ERROR] at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty(ProvidedPropertyBinding.java:48)
[ERROR] at org.eclipse.sisu.bean.BeanInjector.injectMembers(BeanInjector.java:52)
[ERROR] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:140)
[ERROR] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:117)
[ERROR] at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
[ERROR] at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
[ERROR] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1044)
[ERROR] at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
[ERROR] at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
[ERROR] at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
[ERROR] at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
[ERROR] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
[ERROR] at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
[ERROR] at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
[ERROR] at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get(PlexusRequirements.java:250)
[ERROR] at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty(ProvidedPropertyBinding.java:48)
[ERROR] at org.eclipse.sisu.bean.BeanInjector.injectMembers(BeanInjector.java:52)
[ERROR] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:140)
[ERROR] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:117)
[ERROR] at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
[ERROR] at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:92)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
[ERROR] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1044)
[ERROR] at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
[ERROR] at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
[ERROR] at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:176)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
[ERROR] at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
[ERROR] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
[ERROR] at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
[ERROR] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
[ERROR] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
[ERROR] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
[ERROR] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
[ERROR] at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
[ERROR] at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
[ERROR] at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
[ERROR] at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
[ERROR] at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:543)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:483)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] 4 errors
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: org.apache.maven.plugins:maven-install-plugin:2.4:install

回答1:

After some research, I felt it looked like some version incompatibility. and indeed, it is, between the maven version I am using to build the applications using the plugin, and the maven core version used in the plugin.

  • in my plugin, I was using latest maven core version available as a dependency, ie 3.5.2
  • I am building the plugin with Maven 3.3.1 and build is OK.
  • but when I build a project using the plugin, with Maven 3.3.1, the problem happens.

I downgraded maven core to 3.3.9, then rebuilt my plugin, and it works now.

I guess there are some incompatibilities between maven core 3.5.x and previous maven runtime..

I see on https://jaxenter.com/apache-maven-3-5-0-nothing-see-3-4-0-move-along-133180.html that they switched ... from Eclipse Aether to Maven Artifact Resolver

but what was very confusing is that my build was failing not at the time of my plugin being called, but after.



回答2:

if you are running inside IntelliJ IDEA go to

  • Build -> Execution, Deployment > Build tools > Maven

  • Update maven directory as your maven /dir. (maven-3.6.0)

The default one is 3.3.9 for IntelliJ idea 2018.3.1



回答3:

For a spring boot project, if you can't easily update maven version for some reason ( in my case the error appeared in automated builds which used a maven docker container from a custom docker registry )

Specifying a version for plugin spring-boot-maven-plugin fixed the issue for me

    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>1.3.5.RELEASE</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </pluginManagement>


回答4:

I had same issue but after updating maven version from 3.3.9 to 3.6.3 solved my problem. Please try upgrading maven to 3.6.X . Hope this helps someone. Happy Learning :).



回答5:

Specifying a version for plugin spring-boot-maven-plugin fixed the issue for me as well. Here is what I changed:

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.16.RELEASE</version>


回答6:

I had the same issue and changed jdeb plugin version and it fixed.



回答7:

I had met the same issue when upgrade jdeb from 1.5 to 1.7. And downgrade it to 1.5 and it fixed.

                        <artifactId>jdeb</artifactId>
                        <groupId>org.vafer</groupId>
                        <version>1.5</version>


回答8:

In my case, 3.3.9 maven was mandatory to use as other project were using same maven in jenkins build.

So I downgraded my com.spotify plugin from 1.4.10 to 1.4.6 by refering to below link

https://mvnrepository.com/artifact/com.spotify/dockerfile-maven-plugin/1.4.6

in this link we can see maven supported version