spring有一個入門例子,在docker里跑spring-boot程序
下載后按照教程執行mvn package docker:build。並不能成功。會報錯。
[ERROR] No plugin found for prefix 'docker' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (D:\xxxxxxx), nexus (http://repo2.maven.org/maven2/), skynet (http://maven2.mirrors.skynet.be/pub/maven2/)] -> [Help 1]
仔細發現,並不是倉庫中沒有提供而是這個插件不在白名單里面
<plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> </plugin>
我們需要在settings.xml里把這個group加上
<settings> <pluginGroups> <pluginGroup>com.spotify</pluginGroup> </pluginGroups> </settings>
這樣就能正常下載這個插件了。