jfrog / artifactory-maven-plugin

A Maven plugin to resolve artifacts from Artifactory, deploy artifacts to Artifactory, capture and publish build info.
https://www.jfrog.com/confluence/display/JFROG/Maven+Artifactory+Plugin
Apache License 2.0
24 stars 26 forks source link

"No implementation for RepositoryListener was bound" error #72

Open EstebanDugueperoux2 opened 1 year ago

EstebanDugueperoux2 commented 1 year ago

Describe the bug

when invoking "mvn deploy" on a Maven project using this plugin I get following stacktrace:

Current behavior

[INFO] --- artifactory:3.6.1:publish (build-info) @ demo --- [WARNING] Error injecting: org.jfrog.buildinfo.ArtifactoryMojo com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) No implementation for RepositoryListener was bound. while locating ArtifactoryMojo

1 error

====================== Full classname legend:

ArtifactoryMojo: "org.jfrog.buildinfo.ArtifactoryMojo" RepositoryListener: "org.jfrog.buildinfo.resolution.RepositoryListener"

End of classname legend:

at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:251)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1104)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1139)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:86)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:67)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:124)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:62)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1101)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:491)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:114)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 05:48 min [INFO] Finished at: 2023-07-19T11:35:39+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.jfrog.buildinfo:artifactory-maven-plugin:3.6.1:publish (build-info) on project demo: Execution build-info of goal org.jfrog.buildinfo:artifactory-maven-plugin:3.6.1:publish failed: Unable to load the mojo 'publish' (or one of its required components) from the plugin 'org.jfrog.buildinfo:artifactory-maven-plugin:3.6.1': com.google.inject.ProvisionException: Unable to provision, see the following errors: [ERROR] [ERROR] 1) No implementation for RepositoryListener was bound. [ERROR] while locating ArtifactoryMojo [ERROR] at ClassRealm[plugin>org.jfrog.buildinfo:artifactory-maven-plugin:3.6.1, parent: ClassLoaders$AppClassLoader@2a139a55] [ERROR] _ installed by: WireModule -> PlexusBindingModule [ERROR] while locating Mojo annotated with @Named("org.jfrog.buildinfo:artifactory-maven-plugin:3.6.1:publish") [ERROR] [ERROR] 1 error [ERROR] [ERROR] ====================== [ERROR] Full classname legend: [ERROR] ====================== [ERROR] ArtifactoryMojo: "org.jfrog.buildinfo.ArtifactoryMojo" [ERROR] ClassLoaders$AppClassLoader: "jdk.internal.loader.ClassLoaders$AppClassLoader" [ERROR] Mojo: "org.apache.maven.plugin.Mojo" [ERROR] Named: "com.google.inject.name.Named" [ERROR] PlexusBindingModule: "org.eclipse.sisu.plexus.PlexusBindingModule" [ERROR] RepositoryListener: "org.jfrog.buildinfo.resolution.RepositoryListener" [ERROR] WireModule: "org.eclipse.sisu.wire.WireModule" [ERROR] ======================== [ERROR] End of classname legend: [ERROR] ======================== [ERROR] [ERROR] role: org.apache.maven.plugin.Mojo [ERROR] roleHint: org.jfrog.buildinfo:artifactory-maven-plugin:3.6.1:publish [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

Reproduction steps

To reproduce:

`

org.graalvm.buildtools native-maven-plugin org.springframework.boot spring-boot-maven-plugin org.jfrog.buildinfo artifactory-maven-plugin 3.6.1 build-info publish https://myArtifactoryInstance/artifactory XXX yyy releaseRepo snapshotRepo
</build>`

Expected behavior

I expect a successfull execution and that this plugin fetch by default Artifactory infos from distributionManagement tag.

Artifactory Maven plugin version

3.6.1

Operating system type and version

Windows 10 Entreprise

JFrog Artifactory version

Enterprise Plus 7.31.16 rev 73116900

Maven version

3.9.3