当用maven build项目时出现了以下错误:java
Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project config: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refusedlinux
多方查找资料,最后发现,原来是本身的docker没装,也是醉了。docker
因此之后你们也出现了这种错误,缘由可能:apache
1.没安装dockermaven
2.若是安装了docker的话,可能docker的daemon没有运行ui
解决办法:spa
1.安装docker,docker官网有详细步骤.net
2.开启docker的守护进程,在linux上,运行code
1 systemctl start docker.service
再查资料的过程当中找到与我相似的错误的一篇博客:http://blog.csdn.net/chinamcafee/article/details/66974686blog
其报错是:
Failed to execute goal com.spotify:docker-maven-plugin:0.2.9:build (default-cli) on project config: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused
解决办法:
把docker-maven-plugin版本更新成0.4.13便可