mvn clean install -Pdocker

Throws the following error:

[WARNING] An attempt failed, will retry 1 more times
org.apache.maven.plugin.MojoExecutionException: Could not build image
    at
com.spotify.plugin.dockerfile.BuildMojo.buildImage(BuildMojo.java:185)
    at com.spotify.plugin.dockerfile.BuildMojo.execute(BuildMojo.java:105)
    at
com.spotify.plugin.dockerfile.AbstractDockerMojo.tryExecute(AbstractDockerMojo.java:227)
    at
com.spotify.plugin.dockerfile.AbstractDockerMojo.execute(AbstractDockerMojo.java:216)
    at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    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:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    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: com.spotify.docker.client.exceptions.DockerException:
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.JsonMappingException:
Can not construct instance of
com.spotify.docker.client.messages.RegistryAuth: no String-argument
constructor/factory method to deserialize from String value ('swarm')
 at [Source: N/A; line: -1, column: -1] (through reference chain:
java.util.LinkedHashMap["stackOrchestrator"])
    at
com.spotify.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:102)
    at
com.spotify.docker.client.auth.MultiRegistryAuthSupplier.authForBuild(MultiRegistryAuthSupplier.java:77)
    at
com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1388)
    at
com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1365)
    at
com.spotify.plugin.dockerfile.BuildMojo.buildImage(BuildMojo.java:178)
    ... 25 more
Caused by:
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.JsonMappingException:
Can not construct instance of
com.spotify.docker.client.messages.RegistryAuth: no String-argument
constructor/factory method to deserialize from String value ('swarm')
 at [Source: N/A; line: -1, column: -1] (through reference chain:
java.util.LinkedHashMap["stackOrchestrator"])
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1456)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1012)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:370)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:315)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1283)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:159)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:150)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:517)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:362)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:27)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1187)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:314)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:148)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3770)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2099)
    at
com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:2596)
    at
com.spotify.docker.client.DockerConfigReader.parseDockerConfig(DockerConfigReader.java:95)
    at
com.spotify.docker.client.DockerConfigReader.fromConfig(DockerConfigReader.java:48)
    at
com.spotify.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:100)
    ... 29 more
[INFO] Building Docker context
/private/tmp/nifi/nifi-1.9.1/nifi-docker/dockermaven




I was able to resolve it by upgrading the plugin to 1.4.10 from our current
use of 1.3.5

Reply via email to