java Gradle 7.4构建版本出现解决错误:服务器可能不支持客户端请求的TLS协议版本

yqkkidmi  于 2023-02-11  发布在  Java
关注(0)|答案(1)|浏览(676)

我尝试使用以下gradle属性构建一个gradle项目:

## use proxy
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=7890
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7890

## config tls
systemProp.https.protocols=TLSv1.1,TLSv1.2,TLSv1.3
systemProp.jdk.tls.client.protocols=TLSv1.1,TLSv1.2,TLSv1.3

我在端口7890有一个代理。Jdk是17,gradle是7.4。当我构建名为airbyte的开源项目时,我收到了以下错误:

Building all of Airbyte.
/Users/wanshao/projects/cdc/airbyte/airbyte-integrations/connectors
> Task :buildSrc:extractPluginRequests UP-TO-DATE
> Task :buildSrc:generatePluginAdapters UP-TO-DATE
> Task :buildSrc:compileJava UP-TO-DATE
> Task :buildSrc:compileGroovy UP-TO-DATE
> Task :buildSrc:compileGroovyPlugins UP-TO-DATE
> Task :buildSrc:pluginDescriptors UP-TO-DATE
> Task :buildSrc:processResources UP-TO-DATE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:validatePlugins UP-TO-DATE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build UP-TO-DATE
Download https://plugins.gradle.org/m2/io/swagger/swagger-parser/1.0.55/swagger-parser-1.0.55.jar, took 1 s 880 ms (94.89 kB)

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/wanshao/projects/cdc/airbyte/build.gradle' line: 322

* What went wrong:
A problem occurred evaluating root project 'airbyte'.
> A problem occurred configuring project ':airbyte-api'.
   > Could not resolve all files for configuration ':airbyte-api:classpath'.
      > Could not download joda-time-2.10.8.jar (joda-time:joda-time:2.10.8)
         > Could not get resource 'https://plugins.gradle.org/m2/joda-time/joda-time/2.10.8/joda-time-2.10.8.jar'.
            > Could not GET 'https://plugins.gradle.org/m2/joda-time/joda-time/2.10.8/joda-time-2.10.8.jar'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.1, TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.4/userguide/build_environment.html#gradle_system_properties
                  > Remote host terminated the handshake
jjjwad0x

jjjwad0x1#

是网络和代理不好造成的,我调整了代理和网络,一切顺利。

相关问题