Open atomotic opened 6 years ago
Hi @atomotic,
Could you please attach the stacktrace and any additional info for that Maven run? You can re-run using mvn -e -X package
to get the complete error information.
I think the issue here is that the package
goal tries to create a Docker image, even when there is no Docker client installed locally.
Caused by: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.spotify.docker.client.messages.RegistryAuth` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('enabled')
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["experimental"])
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1342)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1031)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:371)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:323)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1366)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:171)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1276)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3972)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2264)
at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:2746)
at com.spotify.docker.client.DockerConfigReader.parseDockerConfig(DockerConfigReader.java:116)
at com.spotify.docker.client.DockerConfigReader.fromConfig(DockerConfigReader.java:51)
at com.spotify.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:106)
... 29 more
i see at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["experimental"])
i guess that the problem could be in my docker config (18.05.0-ce macos)
➜ ~ cat .docker/config.json
{
"experimental" : "enabled",
"credsStore" : "osxkeychain",
"orchestrator" : "swarm"
}
related to: https://github.com/spotify/docker-client/issues/657
upgrade to dockerfile-maven-plugin 1.4.3 fix the issue, now the build works and also the docker image is ready.
https://github.com/dlcs/elucidate-server/blob/develop/elucidate-server/pom.xml#L30
Hi @workergnome, can you attempt a build now using the develop
branch, following @atomotic's pull request?
running mvn clean package install -U -DskipTests
from within the elucidate-parent
directory on the develop
branch, It builds successfully now, though with a certain number of warnings.
trying to build the develop branch:
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.0:build (default) on project elucidate-server: Could not build image: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.spotify.docker.client.messages.RegistryAuth` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('enabled')