在当前项目和插件组中找不到前缀’docker’的插件

前端之家收集整理的这篇文章主要介绍了在当前项目和插件组中找不到前缀’docker’的插件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

使用docker部署Spring Cloud项目,pom.xml中的一些代码

当我执行命令:mvn package docker:build时,它抛出上述错误:

    Downloaded: http://3.2.4.2:8888/repository/maven-public/org/apache/maven/plugins/maven-metadata.xml (14 KB at 5.7 KB/sec)
    Downloaded: http://3.2.4.2:8888/repository/maven-public/org/codehaus/mojo/maven-metadata.xml (21 KB at 7.3 KB/sec)
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] eureka-server ...................................... SUCCESS [ 26.279 s]
    [INFO] service-1 ......................................... SUCCESS [ 14.649 s]
    [INFO] demo1 ........................................... FAILURE [  2.850 s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 45.535 s
    [INFO] Finished at: 2017-11-15T14:28:05+08:00
    [INFO] Final Memory: 47M/532M
    [INFO] ------------------------------------------------------------------------
    [ERROR] No plugin found for prefix 'docker' in the current project 
and in the plugin groups [org.sonatype.plugins,org.apache.maven.plugins,org.codehaus.mojo] available from the repositories [local (/Users/../Repository),nexus (http://3.2.4.2:8888/repository/maven-public/)]

怎么解决?

最佳答案
将以下代码添加到您的maven conf / setting.xml:

如果您想获得更多细节,请参阅https://github.com/spotify/docker-maven-plugin/issues/322

猜你在找的Docker相关文章