我们的节点上的gradle build返回与pom文件解析相关的错误。有人可以帮助指出如何解决这个问题吗?我需要下载并存储pom文件在节点上的特定位置吗?或者它们会被gradle自动下载吗?我感谢你的帮助。
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"
1条答案
按热度按时间cigdeys31#
首先,您必须检查该网站是否可以通过您的浏览器访问。
试试这个,
https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.21/kotlin-gradle-plugin-1.4.21.pom
与您的浏览器,如果你得到的文件下载,那么你可以忽略其余的答案。如果没有,您将需要为Gradle设置有效的代理连接以获得有效的访问权限。
下面是我的an old answer,描述如何完成此操作
请记住,
USER/%USERNAME%/.gradle/gradle.properties
是全局配置,您可以通过在项目目录中使用以下信息创建gradle.properties
来更改项目级别。