"无法设置org.eclipse.aether.spi.log.Logger"使用自定义maven插件

时间:2017-12-21 07:52:22

标签: java maven maven-plugin

我写了一个小的自定义maven插件,它运行正常..大部分时间。

使用它时,它被配置为在测试阶段运行,我看到它正在执行,没问题。现在问题出现了,当我使用插件在项目中 mvn clean install mvn clean deploy 时:它失败并显示一条我无法理解的消息。它显然来自我的插件,因为如果我删除它,那么 mvn clean install 就可以了。

错误信息非常长,它有4条与下面相似的痕迹。

我对它可能来自何处毫无头绪......任何想法?

 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

10 个答案:

答案 0 :(得分:21)

经过一番研究,我觉得它看起来像某些版本不兼容。实际上,它是在我用来构建使用插件的应用程序的maven版本和插件中使用的maven核心版本之间。

  • 在我的插件中,我使用最新的maven核心版本作为依赖,即3.5.2
  • 我正在使用Maven 3.3.1构建插件并且构建正常。
  • 但是当我使用插件构建项目时,使用Maven 3.3.1,问题就出现了。

我将maven core降级到3.3.9,然后重新构建了我的插件,它现在正常工作。

我猜maven core 3.5.x和之前的maven运行时之间存在一些不兼容性。

我在https://jaxenter.com/apache-maven-3-5-0-nothing-see-3-4-0-move-along-133180.html看到他们将 ...从Eclipse Aether切换到Maven Artifact Resolver

但令人困惑的是,我的构建在我的插件被调用时没有失败,但之后。

答案 1 :(得分:1)

对于spring boot项目,如果由于某种原因您不能轻易更新maven版本(在我的情况下,错误出现在使用自定义docker注册表中的maven docker容器的自动构建中)

指定插件的版本 spring-boot-maven-plugin 为我解决了该问题

    <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>

答案 2 :(得分:1)

我遇到了同样的问题,但是在将Maven版本从3.3.9更新到3.6.3之后,我的问题解决了。请尝试将maven升级到3.6.X。希望这对某人有帮助。祝您学习愉快:)。

答案 3 :(得分:0)

指定插件spring-boot-maven-plugin的版本也解决了我的问题。这是我更改的内容:

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

答案 4 :(得分:0)

我遇到了同样的问题,并更改了jdeb插件版本,并修复了该问题。

答案 5 :(得分:0)

将jdeb从1.5升级到1.7时遇到了同样的问题。并将其降级到1.5并修复。

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

答案 6 :(得分:0)

如果您在IntelliJ IDEA中运行,请转至

  
      
  • 构建->执行,部署>构建工具> Maven

  •   
  • 将maven目录更新为您的maven / dir。 (maven-3.6.0)

  •   
     

IntelliJ idea 2018.3.1的默认值为3.3.9

enter image description here

答案 7 :(得分:0)

在我的情况下,必须强制使用3.3.9 maven,因为其他项目在jenkins构建中使用相同的maven。

因此,我通过参考下面的链接

将com.spotify插件从1.4.10降级到1.4.6。
https://mvnrepository.com/artifact/com.spotify/dockerfile-maven-plugin/1.4.6

在此链接中,我们可以看到Maven支持的版本

答案 8 :(得分:0)

与其他建议降级Spotify的答案相反,在我看来,更新Spotify版本对我有用。

答案 9 :(得分:0)

  1. 在命令提示符下使用“mvn --version”检查 maven 的版本。
  2. 在命令行上运行“mvn deploy”以查看是否有效。
  3. 在 IntelliJ 中转到 Build -> Execution, Deployment > Build tools > Maven 并将 maven 的版本更改为您电脑上可用的版本,而不是提供的默认包。