1

I try to build a gradle project with following gradle properties:


## 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

I have a proxy at port 7890. Jdk is 17 and gradle is 7.4. When I build the opensource project called airbyte. I got the following error:

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


Kami Wan
  • 724
  • 2
  • 9
  • 23
  • 1
    First step in resolving these is see if I can hit the host that Gradle is failing at... In this case, `https://plugins.gradle.org`, and then the full path to the plugin and see if it starts downloading. Bottom line... If your browser can hit it, but gradle can't, invesitgate you proxy. If your browser CANT hit it, investigate your proxy. – User51 Feb 03 '23 at 14:07

1 Answers1

2

It is caused by poor network and proxy. I adjust my proxy and network and everything goes well.

Kami Wan
  • 724
  • 2
  • 9
  • 23
  • 1
    What did you do to adjust the proxy and network? Have been struck on this error fo 2 days now – Ramakrishna Joshi Apr 05 '23 at 09:52
  • 1
    @RamakrishnaJoshi If you ensure your proxy works well. You can try to use the global proxy and ensure the gradle really send packet through the proxy. – Kami Wan Apr 11 '23 at 11:39
  • Hey, I was able to figure it out. A proxy installed by IT Department was not allowing dependencies to be downloaded. I wrote about it here: https://stackoverflow.com/a/75948144/8956093 – Ramakrishna Joshi Apr 11 '23 at 14:23