bitbucket管道无法下载maven工件

时间:2017-10-27 09:55:02

标签: maven bitbucket bitbucket-pipelines

使用bitbucket管道点击以下问题并且无法找出可能发生的原因 - 在构建期间我经常看到以下错误:

Downloading: https://repo.maven.apache.org/maven2/org/springframework/security/spring-security-test/4.0.3.RELEASE/spring-security-test-4.0.3.RELEASE.pom
Oct 27, 2017 8:19:37 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
Oct 27, 2017 8:19:37 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://repo.maven.apache.org:443
Oct 27, 2017 8:19:37 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
Oct 27, 2017 8:19:37 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://repo.maven.apache.org:443
Oct 27, 2017 8:19:37 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
Oct 27, 2017 8:19:37 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {s}->https://repo.maven.apache.org:443

Downloading: https://repo.maven.apache.org/maven2/org/bitbucket/radistao/test/before-after-spring-test-runner/0.1.0/before-after-spring-test-runner-0.1.0.pom
2/2 KB       

Downloaded: https://repo.maven.apache.org/maven2/org/bitbucket/radistao/test/before-after-spring-test-runner/0.1.0/before-after-spring-test-runner-0.1.0.pom (2 KB at 21.8 KB/sec)
[INFO] ------------------------------------------------------------------------

其他lib下载得很好,在我将before-after-spring-test-runner库添加到pom.xml后问题就开始了。在本地,即使在完全回购清理之后,构建也会像往常一样从IDE和CLI运行 有人能说出这两个事实之间可能存在什么联系? :)

1 个答案:

答案 0 :(得分:0)

管道开始关闭在上次基础架构更新后空闲超过5分钟的空闲Maven连接。这会影响运行Maven并且花费的时间超过这段时间的任何构建,因为这样的构建将因“连接重置套接字异常”而失败。

Maven生命周期中的某些插件在运行集成测试后被触发,唯一的解决方法是强制Maven使用

在每个请求上使用新连接
mvn -Dmaven.wagon.http.pool=false clean install

然而,这会影响构建时间。