首页 > 解决方案 > Java LWJGL - Gradle 只是不想找到工件

问题描述

我正在尝试使用 IntelliJ IDEA 设置存储库的克隆。( Github-链接)

它使用 gradle,它是一个基于 LWJGL(一个用于原生 OpenGL 访问的 java 库)的项目。

而 gradle 只是不想构建,因为它找不到工件,尽管在这个项目上工作的其他人都没有类似的问题。

我正在使用这个 gradle 构建:

------------------------------------------------------------
Gradle 6.8.3
------------------------------------------------------------

Build time:   2021-02-22 16:13:28 UTC
Revision:     9e26b4a9ebb910eaa1b8da8ff8575e514bc61c78

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_152 
OS:           Windows 10 10.0 amd64

我现在搜索了几周并尝试了其他对其他人有用的不同解决方案,例如重置依赖项缓存或打开/关闭离线模式

我什至手动查找了所有链接并验证了它们背后的所有文件确实存在。

下面错误消息中提到的 TLS 协议没有帮助,我尝试更改使用的协议版本,但它变得更糟。

有些人提到了一些关于代理的事情,但我真的不明白为什么这应该是必要的,因为 Maven(我通常使用)确实可以正常工作。Maven 可以零问题地找到那些完全相同的工件。可悲的是,我无法将项目从 gradle 更改为 maven。

如果需要更多信息,请询问:)

Gradle 告诉我:

Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve org.lwjgl:lwjgl-bom:3.2.3.
     Required by:
         project :
      > Could not resolve org.lwjgl:lwjgl-bom:3.2.3.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/lwjgl/lwjgl-bom/3.2.3/lwjgl-bom-3.2.3.pom'.
            > Could not HEAD 'https://repo.maven.apache.org/maven2/org/lwjgl/lwjgl-bom/3.2.3/lwjgl-bom-3.2.3.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/6.8.3/userguide/build_environment.html#gradle_system_properties
                  > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.lwjgl:lwjgl-bom:3.2.3.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/lwjgl/lwjgl-bom/3.2.3/lwjgl-bom-3.2.3.pom'.
            > Could not HEAD 'https://repo.maven.apache.org/maven2/org/lwjgl/lwjgl-bom/3.2.3/lwjgl-bom-3.2.3.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/6.8.3/userguide/build_environment.html#gradle_system_properties
                  > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not find org.lwjgl:lwjgl:.
     Required by:
         project :
   > Could not find org.lwjgl:lwjgl-glfw:.
     Required by:
         project :
   > Could not find org.lwjgl:lwjgl-openal:.
     Required by:
         project :
   > Could not find org.lwjgl:lwjgl-opengl:.
     Required by:
         project :
   > Could not find org.lwjgl:lwjgl-stb:.
     Required by:
         project :
   > Could not resolve org.joml:joml:1.10.1.
     Required by:
         project :
      > Could not resolve org.joml:joml:1.10.1.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/joml/joml/1.10.1/joml-1.10.1.pom'.
            > Could not HEAD 'https://repo.maven.apache.org/maven2/org/joml/joml/1.10.1/joml-1.10.1.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/6.8.3/userguide/build_environment.html#gradle_system_properties
                  > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve org.joml:joml:1.10.1.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/joml/joml/1.10.1/joml-1.10.1.pom'.
            > Could not HEAD 'https://repo.maven.apache.org/maven2/org/joml/joml/1.10.1/joml-1.10.1.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/6.8.3/userguide/build_environment.html#gradle_system_properties
                  > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.


标签: javagradlebuild

解决方案


推荐阅读