You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please fill out the following information to help us in analyzing the issue, but feel free to skip it if you don't have the information at hand or if it does not apply. Please remove everything which does not apply to the issue. Including this info paragraph ;-)
Description
When using the true option of in the assembly descriptor the maven build will fail with: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Info
d-m-p version : 0.21.0
Maven version (mvn -v) : 3.3.9 (Spring Tool Suite embedded)
Docker version : Docker version 17.05.0-ce, build 89658be
If it's a bug, how to reproduce
Setup a basic project that will invoke the plugin's build goal.
Attach an assembly descriptor within the tag whose contents contain a which hastrue
Full maven stacktrace: [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (build-image) on project assembly: Execution build-image of goal io.fabric8:docker-maven-plugin:0.21.0:build failed: Index: 0, Size: 0 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (build-image) on project assembly: Execution build-image of goal io.fabric8:docker-maven-plugin:0.21.0:build failed: Index: 0, Size: 0 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution build-image of goal io.fabric8:docker-maven-plugin:0.21.0:build failed: Index: 0, Size: 0 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.getModuleProjects(ModuleSetAssemblyPhase.java:559) at org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase$1.accept(ModuleSetAssemblyPhase.java:134) at org.apache.maven.plugin.assembly.model.Assemblies.forEachModuleSet(Assemblies.java:40) at org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.execute(ModuleSetAssemblyPhase.java:126) at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:178) at io.fabric8.maven.docker.assembly.DockerAssemblyManager.createAssemblyArchive(DockerAssemblyManager.java:394) at io.fabric8.maven.docker.assembly.DockerAssemblyManager.createDockerTarArchive(DockerAssemblyManager.java:84) at io.fabric8.maven.docker.service.ArchiveService.createArchive(ArchiveService.java:102) at io.fabric8.maven.docker.service.BuildService.buildImage(BuildService.java:112) at io.fabric8.maven.docker.service.BuildService.buildImage(BuildService.java:60) at io.fabric8.maven.docker.BuildMojo.buildAndTag(BuildMojo.java:58) at io.fabric8.maven.docker.BuildMojo.executeInternal(BuildMojo.java:44) at io.fabric8.maven.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:223) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 21 more
The text was updated successfully, but these errors were encountered:
I've forked the repository and made some tweaks to the MojoParameters and DockerAssemblyConfigurationSource to pass through the reactorProjects maven variable and use this list of projects. By doing this the issue I was facing has been resolved. Would you like me to initiate a PR?
PR submitted. I had to add the signed off by after my initial commit (forgot it), and then I tried to squash the commits using the interactive rebase but it seems that it increased the number of commits instead of squashing it like I expected. I'm a Git neophyte, forgive me :(.
Please fill out the following information to help us in analyzing the issue, but feel free to skip it if you don't have the information at hand or if it does not apply. Please remove everything which does not apply to the issue. Including this info paragraph ;-)
Description
When using the true option of in the assembly descriptor the maven build will fail with: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Info
mvn -v
) : 3.3.9 (Spring Tool Suite embedded)sample_assembly.txt
Full maven stacktrace:
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (build-image) on project assembly: Execution build-image of goal io.fabric8:docker-maven-plugin:0.21.0:build failed: Index: 0, Size: 0 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (build-image) on project assembly: Execution build-image of goal io.fabric8:docker-maven-plugin:0.21.0:build failed: Index: 0, Size: 0 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution build-image of goal io.fabric8:docker-maven-plugin:0.21.0:build failed: Index: 0, Size: 0 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.getModuleProjects(ModuleSetAssemblyPhase.java:559) at org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase$1.accept(ModuleSetAssemblyPhase.java:134) at org.apache.maven.plugin.assembly.model.Assemblies.forEachModuleSet(Assemblies.java:40) at org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.execute(ModuleSetAssemblyPhase.java:126) at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:178) at io.fabric8.maven.docker.assembly.DockerAssemblyManager.createAssemblyArchive(DockerAssemblyManager.java:394) at io.fabric8.maven.docker.assembly.DockerAssemblyManager.createDockerTarArchive(DockerAssemblyManager.java:84) at io.fabric8.maven.docker.service.ArchiveService.createArchive(ArchiveService.java:102) at io.fabric8.maven.docker.service.BuildService.buildImage(BuildService.java:112) at io.fabric8.maven.docker.service.BuildService.buildImage(BuildService.java:60) at io.fabric8.maven.docker.BuildMojo.buildAndTag(BuildMojo.java:58) at io.fabric8.maven.docker.BuildMojo.executeInternal(BuildMojo.java:44) at io.fabric8.maven.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:223) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 21 more
The text was updated successfully, but these errors were encountered: