maven 打包_使用docker-maven-plugin打包报错 token 'credentials'

fd72e56df76ebac5cd9e482672dd3a4d.png
Exception caught: com.spotify.docker.client.shaded.com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'credentials': was expecting ('true', 'false' or 'null')

主要的错误信息

Exception caught: com.spotify.docker.client.shaded.com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'credentials': was expecting ('true', 'false' or 'null')

错误信息

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.1.1:build (default-cli) on project common: Exception caught: com.spotify.docker.client.shaded.com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'credentials': was expecting ('true', 'false' or 'null')
[ERROR]  at [Source: (String)"credentials not found in native keychain"; line: 1, column: 12]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :common

错误图片

8233d683c266b0bf0995224d1e5e138a.png

解决方案

找到例如windows为例

C:UsersAdministrator.docker

的config.json文件

f1b33d5994f1f7b37e8c4f1b1d70025d.png

改为

29bd4fca6de890ec82e7133f8f5ff821.png

重新打包,大功告成

微信公众号:ucisoft

抖音: AndotStudio

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Docker-maven-plugin是一种用于构建、打包和推送Docker镜像的Maven插件。当Docker-maven-plugin配置出现代码错误时,在Maven构建过程中就会出现红色报错信息。但是,由于很可能会有不同原因导致报错,因此需要更具体的信息才能找到解决方案。以下是一些常见的Docker-maven-plugin配置报错及其可能的解决方案: 1. 错误信息: "Could not find goal &#39;clean&#39; in plugin com.spotify:docker-maven-plugin:1.0.0" 解决方案:这通常是由于Docker-maven-plugin版本错误而导致的。通过查看pom.xml,确保正确指定了所需的Docker-maven-plugin版本即可。 2. 错误信息: "Unsupported major.minor version 52.0" 解决方案:这意味着Java版本不兼容。Docker-maven-plugin需要Java 1.8或更高版本。升级到正确的Java版本即可。 3. 错误信息: "Invalid Dockerfile: no ADD instruction" 解决方案:这可能是由于Dockerfile中没有ADD指令导致的。确保在Dockerfile中包含了所需的ADD指令即可。 4. 错误信息: "Error building Docker image: Could not build image: Error parsing reference:" 解决方案:这可能是由于在Dockerfile中使用了无效的Docker标签导致的。确保使用正确的Docker标签即可。 总之,Docker-maven-plugin配置报红的原因有很多,解决方案也各不相同。通过查看具体的错误信息,并逐一排除可能的问题,我们就能成功解决问题,使构建过程平稳进行。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值