昨天打包一个开源项目的docker镜像的时候,出现一个错误提示:
docker:No plugin found for prefix 'docker' in the current project
原来是maven的settings里面没有配置好。修改.m2/settings.xml文件如下:
<!-- pluginGroups
| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
|-->
<pluginGroups>
<!-- pluginGroup
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
<pluginGroup>com.spotify</pluginGroup>
</pluginGroups>
题外话:原来maven-docker-plugin是Spotify这家公司开发的呢