Description
Description
While building a docker-image, which included the dockerfile-maven-plugin > 1.3.1 and an activated proxy in mavens setting.xml, the build will fail with the fhe following message:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.spotify:dockerfile-maven-plugin:1.3.4:build (default) on project XXXXX: Execution default of goal com.spotify:dockerfile-maven-plugin:1.3.4:build failed: Host name may not be null
If i remove the proxy-part or use an older version of dockerfile-maven-plugin, everything is fine. I`ve read that dockerfile-maven-plugin is using docker-client 8.8.X instead 8.7.X which added proxy-support, so i thought it could be
How to reproduce
Define a pom which includes dockerfile-maven-plugin/docker-client, define "build" as goal and set a proxy in mavens settings.xml
What do you expect
BUILD SUCCESS
What happened instead
BUILD FAILED
Software:
docker version
: [Add the output ofdocker version
here, both client and server]- Spotify's docker-client version: [Add docker-client version here]
Full backtrace
com.spotify:dockerfile-maven-plugin:1.3.4:build failed: Host name may not be null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.spotify:dockerfile-maven-plugin:1.3.4:build failed: Host name may not be null
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.IllegalArgumentException: Host name may not be null
at org.apache.http.util.Args.containsNoBlanks(Args.java:81)
at org.apache.http.HttpHost.<init>(HttpHost.java:81)
at org.glassfish.jersey.apache.connector.ApacheConnector.<init>(ApacheConnector.java:255)
at org.glassfish.jersey.apache.connector.ApacheConnectorProvider.getConnector(ApacheConnectorProvider.java:115)
at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:425)
at org.glassfish.jersey.client.ClientConfig$State.access$000(ClientConfig.java:90)
at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:122)
at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:119)
at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:340)
at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:733)
at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:286)
at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:135)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:105)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:101)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:92)
at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.method(JerseyInvocation.java:620)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2441)
at com.spotify.docker.client.DefaultDockerClient.version(DefaultDockerClient.java:501)
at com.spotify.docker.client.DefaultDockerClient.authRegistryHeader(DefaultDockerClient.java:2555)
at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1396)
at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1365)
at com.spotify.plugin.dockerfile.BuildMojo.buildImage(BuildMojo.java:177)
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:101)
... 20 more