Spring Cloud(2) |No plugin found for prefix 'docker' in the current project and in the plugin groups
来源:互联网 发布:喀秋莎中文版软件下载 编辑:程序博客网 时间:2024/06/05 04:18
用docker部署Spring Cloud项目的时候,运行命令:
mvn package docker:build
报如下错误:
at 1.6 KB/sec)
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/)]
pom.xml中文件是:
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <!-- tag::plugin[] --> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.4.13</version> <configuration> <imageName>${docker.image.prefix}/${project.artifactId}</imageName> <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin> <!-- end::plugin[] --> </plugins> </build>
检查pom文件没有任何问题,最后发现在maven的conf/setting.xml中要加入:
<pluginGroups> <pluginGroup>com.spotify</pluginGroup> </pluginGroups>
然后再运行mvn package docker:build, 就OK了!
参照:https://stackoverflow.com/questions/47301470/no-plugin-found-for-prefix-docker-in-the-current-project-and-in-the-plugin-gro
- Spring Cloud(2) |No plugin found for prefix 'docker' in the current project and in the plugin groups
- no plugin found for prefix 'tomcat 7' in the current project and in the plugin groups
- No plugin found for prefix 'jetty' in the current project and in the plugin groups
- no plugin found for prefix 'tomcat 7' in the current project and in the plugin groups
- No plugin found for prefix 'jetty' in the current project and in the plugin groups
- No plugin found for prefix 'war' in the current project and in the plugin groups
- No plugin found for prefix ‘war’ in the current project and in the plugin groups
- No plugin found for prefix 'jetty' in the current project and in the plugin groups
- No plugin found for prefix 'jetty' in the current project and in the plugin groups
- No plugin found for prefix 'war' in the current project and in the plugin groups
- 错误整理:No plugin found for prefix 'jetty' in the current project and in the plugin groups
- 错误整理:No plugin found for prefix 'jetty' in the current project and in the plugin groups
- 错误整理:No plugin found for prefix 'jetty' in the current project and in the plugin groups
- 错误整理:No plugin found for prefix 'jetty' in the current project and in the plugin groups
- No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.mave
- No plugin found for prefix 'tomcat7' in the current project and in the plugin groups [org.apache.mav
- 错误整理:No plugin found for prefix 'jetty' in the current project and in the plugin groups
- no plugin found for prefix 'tomcat 7' in the current project and in the plugin groups的解决方法
- 四元数与向量乘积的意义
- 将有问题的etcd节点重新加入集群
- 微服务与DevOps
- MD5加密工具类
- MFC调用RDP实现远程桌面共享实例
- Spring Cloud(2) |No plugin found for prefix 'docker' in the current project and in the plugin groups
- 网络请求数据 banner图片轮播和list请求数据
- sql语句
- Android高通平台调试Camera驱动全纪录
- 漫谈《大型网站技术架构》
- 一个pom.xml
- 二值化的SIFT特征描述子及图像拼接优化
- mysql 遇到了Invalid default value for 'created_at'的错误
- Deadlock的一些总结