# 原因
springboot 项目 pom 里引入了 docker-maven-plugin,使用 mvn clean package docker:build 时遇到该问题
<plugin> | |
<groupId>com.spotify</groupId> | |
<artifactId>docker-maven-plugin</artifactId> | |
<version>1.2.0</version> | |
<configuration> | |
<imageName>${project.artifactId}:${project.version}</imageName> | |
<dockerDirectory>${project.basedir}</dockerDirectory> | |
<resources> | |
<resource> | |
<targetPath>/</targetPath> | |
<directory>${project.build.directory}</directory> | |
<include>${project.build.finalName}.jar</include> | |
</resource> | |
</resources> | |
</configuration> | |
</plugin> |
# 修改方法
修改 maven 下的配置文件 settings.xml,重新 build 一下
<settings> | |
<pluginGroups> | |
<pluginGroup>com.spotify</pluginGroup> | |
</pluginGroups> | |
</settings> |
参考:https://github.com/spotify/docker-maven-plugin/issues/322#issuecomment-316604031