fabric8io / docker-maven-plugin

Maven plugin for running and creating Docker images
https://dmp.fabric8.io
Apache License 2.0
1.88k stars 643 forks source link

"Unable to provision: No implementation for DockerAssemblyManager was bound." #1124

Open beargiles opened 5 years ago

beargiles commented 5 years ago

Description

I'm trying to create a proof-of-concept project with a very minimal docker image. I can create and run the docker image using the docker CLI. When I attempt to build it with the plugin I get the error reported below. I've tried several different versions of the driver and maven jars. No joy.

Possibly related - I had to add two explicit dependencies to the pom.xml file. I'm not sure if they're the correct versions or if I'm missing an additional dependency.

Info

1) No implementation for io.fabric8.maven.docker.assembly.DockerAssemblyManager was bound. at ClassRealm[plugin>io.fabric8:docker-maven-plugin:0.27.2, parent: sun.misc.Launcher$AppClassLoader@74a14482] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule) while locating io.fabric8.maven.docker.service.ServiceHubFactory while locating io.fabric8.maven.docker.BuildMojo

1 error at com.google.inject.internal.InjectorImpl$2.get (InjectorImpl.java:1025) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.575 s [INFO] Finished at: 2018-11-19T14:48:53-07:00 [INFO] Final Memory: 19M/723M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.27.2:build (default-cli) on project prototype: Execution default-cli of goal io.fabric8:docker-maven-plugin:0.27.2:build failed: Unable to load the mojo 'build' (or one of its required components) from the plugin 'io.fabric8:docker-maven-plugin:0.27.2': com.google.inject.ProvisionException: Unable to provision, see the following errors: [ERROR] [ERROR] 1) No implementation for io.fabric8.maven.docker.assembly.DockerAssemblyManager was bound. [ERROR] at ClassRealm[plugin>io.fabric8:docker-maven-plugin:0.27.2, parent: sun.misc.Launcher$AppClassLoader@74a14482] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule) [ERROR] while locating io.fabric8.maven.docker.service.ServiceHubFactory [ERROR] while locating io.fabric8.maven.docker.BuildMojo [ERROR] at ClassRealm[plugin>io.fabric8:docker-maven-plugin:0.27.2, parent: sun.misc.Launcher$AppClassLoader@74a14482] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule) [ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=io.fabric8:docker-maven-plugin:0.27.2:build) [ERROR] [ERROR] 1 error [ERROR] role: org.apache.maven.plugin.Mojo [ERROR] roleHint: io.fabric8:docker-maven-plugin:0.27.2:build


* Sample project : https://github.com/beargiles/iac-prototype.git
rhuss commented 5 years ago

Hmm, actually for me the sample project works without issue for me.

I'm using Maven 3.6.0 and Java 1.8.0_191, though. Would it be possible for you to use a new Maven to test ?

jbennett2091 commented 3 years ago

I am getting a similar result:

Compiling a fork of 0.34.1 locally and using the resulting jar in a unix project results in the below. I also had to add an explicit dependency on com.google.guava:guava to the plugin definition to get past an initial error, but after doing that, I get the issue below. On Windows, it seems to work OK - no dependency needed, and no error results. Not sure if I am building it wrong (JDK8, and 'mvn clean install')

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.34.1.2:start (docker-start) on project omni-essentials-systest: Execution docker-start of goal io.fabric8:docker-maven-plugin:0.34.1.2:start failed: Unable to load the mojo 'start' (or one of its required components) from the plugin 'io.fabric8:docker-maven-plugin:0.34.1.2': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) No implementation for io.fabric8.maven.docker.config.handler.compose.DockerComposeConfigHandler was bound.
[ERROR]   at ClassRealm[plugin>io.fabric8:docker-maven-plugin:0.34.1.2, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR]   while locating io.fabric8.maven.docker.config.handler.ImageConfigResolver
[ERROR]   while locating io.fabric8.maven.docker.StartMojo
[ERROR]   at ClassRealm[plugin>io.fabric8:docker-maven-plugin:0.34.1.2, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR]   while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="io.fabric8:docker-maven-plugin:0.34.1.2:start")
[ERROR]
[ERROR] 1 error
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: io.fabric8:docker-maven-plugin:0.34.1.2:start
[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.