无法将阴影罐子上传到联系

时间:2019-09-29 01:08:09

标签: maven nexus

我正在尝试使用Gitlab-Ci将maven项目部署到Nexus,但是当尝试上载由maven-shade-plugin创建的阴影罐时,管道总是失败。知道为什么会这样吗?

管道错误:

public static int min(int a, int b){ if (a <b){ return a; } else { return b; }

阴影插件配置:

[INFO] Uploading to pp-snapshots: https://nexus.myplayplanet.net/repository/myplayplanet-snapshots/net/myplayplanet/MyPlayPlanet-Core/1.14.0-SNAPSHOT/MyPlayPlanet-Core-1.14.0-20190929.002150-7-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:53 min
[INFO] Finished at: 2019-09-29T00:21:51Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project MyPlayPlanet-Core: Failed to deploy artifacts: Could not transfer artifact net.myplayplanet:MyPlayPlanet-Core:jar:shaded:1.14.0-20190929.002150-7 from/to pp-snapshots (https://nexus.myplayplanet.net/repository/myplayplanet-snapshots/): Connection reset by peer (Write failed) -> [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

2 个答案:

答案 0 :(得分:1)

好像我使用了错误的Maven图像。 我只是使用了maven:latest,但是当我将其更改为maven:3.6.2-jdk-8时,它又可以工作了。

答案 1 :(得分:0)

错误是:

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) 
  on project MyPlayPlanet-Core: 

Failed to deploy artifacts: 

Could not transfer artifact net.myplayplanet:MyPlayPlanet-Core:jar:shaded:1.14.0-20190929.002150-7 
from/to pp-snapshots (https://nexus.myplayplanet.net/repository/myplayplanet-snapshots/)

Connection reset by peer (Write failed)

检查快照工件的大小,可能存在大小限制问题。

还要检查本地使用的JDK版本,如this issue

  

通过以下方式禁用TLS 1.3协议:

-Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"