首页 > 解决方案 > eclipse 无法下载依赖项 org.apache.maven.plugins:maven-resources-plugin:2.4.3

问题描述

我正在尝试下载 org.apache.maven.plugins:maven-resources-plugin:2.4.3 的 maven 依赖项

但是日食给了我这些痕迹

Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    at com.squareup.okhttp.Connection.connectTls(Connection.java:235)
    at com.squareup.okhttp.Connection.connectSocket(Connection.java:199)
    at com.squareup.okhttp.Connection.connect(Connection.java:172)
    at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:367)
    at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
    at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)
    at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)
    at com.squareup.okhttp.Call.getResponse(Call.java:267)
    at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
    at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
    at com.squareup.okhttp.Call.execute(Call.java:79)
    at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:167)
    at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:113)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:600)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
    at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
    ... 39 more

我正在使用 Maven 3.5 版。我在某处检查过。这是由于协议版本错误。同样,我设置了环境变量 -MAVEN_OPTS=Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2

我正在使用 eclipse Mars.2 Release (4.5.2)。

除此之外,我在 eclipse.ini 中进行了更改以指向我的 java 位置 -vm C:\Program Files\Java\jdk1.7.0_80\bin\javaw.exe

现在为什么协议版本错误仍然存​​在。我怎样才能删除这个。

我已经有解决方法了。我可以使用终端通过 maven 下载依赖项。但是通常我会清理 eclipse 项目。它开始再次向我显示错误。

除此之外还有一些 XML。Eclipse 向我显示错误

schema_reference.4: Failed to read schema document 'http://jboss.org/schema/cdi/beans_1_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) 
     the root element of the document is not <xsd:schema>.

如果我尝试打开上面的 url 来查看 XSD。它就在那里。

编辑:有什么方法可以知道 eclipse 使用哪个协议来下载依赖项以及 maven 使用哪个协议?

标签: eclipsemavenmaven-2maven-3m2eclipse

解决方案


推荐阅读