免费资源网 – https://freexyz.cn/
使用 docker-maven-plugin 插件时,maven无法拉取对应 jar 包。出现下面问题:
maven 版本:
镜像仓库配置:
<mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>修改 docker-maven-plugin 插件版本 为:0.4.13 后正常
<build> <plugins> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.4.13</version> <configuration> <imageName>itmuch/microservice-discovery-eureka:0.0.1</imageName> <cmd>[“java”, “-version”]</cmd> <entryPoint>[“java”, “-jar”, “${project.build.finalName}.jar”]</entryPoint> <!– 这里是复制 jar 包到 docker 容器指定目录配置 –> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin> </plugins> </build>免费资源网 – https://freexyz.cn/
© 版权声明
THE END
暂无评论内容