0

gradle build on our node returns errors related to pom file resolution. Could someone please help point how to resolve this? Do I need to download and store the pom files at a specific location on the node? or do they get downloaded automatically by gradle? I appreciate your help.

gradle build install -x test

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'converter'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21.
     Required by:
         project :
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom'.
               > Connect to 127.0.0.1:8118 [/127.0.0.1] failed: Connection refused (Connection refused)
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21.
         > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom'.
            > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom'.
               > Connect to 127.0.0.1:8118 [/127.0.0.1] failed: Connection refused (Connection refused)
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21.
         > Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom'.
            > Could not GET 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom'.
               > Connect to 127.0.0.1:8118 [/127.0.0.1] failed: Connection refused (Connection refused)
   > Could not resolve com.netflix.nebula:gradle-ospackage-plugin:6.2.1.

Installed gradle and try to execute "gradle build install -x test"
aSemy
  • 5,485
  • 2
  • 25
  • 51

1 Answers1

0

First, you must check if the site is accessible over your browser.

Try this, https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom with your browser if you get the file downloaded then you can ignore the rest of the answer.

If not, You will need to set up a valid proxy connection for Gradle to get valid access.

Here is an old answer of mine, Descriping how to get this done

and keep in mind, that the USER/%USERNAME%/.gradle/gradle.properties is global configuration, You can make the changes to the project level by creating gradle.properties in the project directory with the following info.

systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=12345
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=12345

George
  • 2,292
  • 2
  • 10
  • 21