本文介绍了RAD/Eclipse 的 Maven https 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 上的 RAD 9.6.1 (Java 8)

RAD 9.6.1 (Java 8) on Windows

Maven 是当前的罪魁祸首,但我打赌这是 Eclipse-wide/Java-wide.在项目和 pom.xml 上显示此 RAD 错误:

Maven is the current culprit, but I'm betting this is Eclipse-wide/Java-wide. RAD errors showing this, on the project and pom.xml:

Failed to read artifact descriptor for com.itextpdf:itext-licensekey:jar:2.0.3
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.itextpdf:itext-licensekey:jar:2.0.3
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:302)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:218)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
        at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
        at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:215)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:188)
        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:119)
        at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:636)
        at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:529)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:491)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:1)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:495)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:350)
        at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:297)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:154)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:89)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
        at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
        at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.itextpdf:itext-licensekey:pom:2.0.3 from/to iText
(https://repo.itextsupport.com/releases): Received fatal alert: handshake_failure
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
        at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:287)
        ... 41 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.itextpdf:itext-licensekey:pom:2.0.3 from/to iText (https://repo.itextsupport.com/releases): Received fatal alert: handshake_failure
        at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:895)
        at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
        at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:673)
        at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
        ... 44 more

Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at com.ibm.jsse2.j.a(j.java:3)
        at com.ibm.jsse2.j.a(j.java:32)
        at com.ibm.jsse2.as.b(as.java:691)
        at com.ibm.jsse2.as.a(as.java:710)
        at com.ibm.jsse2.as.i(as.java:338)
        at com.ibm.jsse2.as.a(as.java:711)
        at com.ibm.jsse2.as.startHandshake(as.java:454)
        at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:242)
        at com.squareup.okhttp.Connection.connect(Connection.java:159)
        at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:175)
        at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:120)
        at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:330)
        at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:319)
        at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
        at com.squareup.okhttp.Call.getResponse(Call.java:271)
        at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:228)
        at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:199)
        at com.squareup.okhttp.Call.execute(Call.java:79)
        at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:154)
        at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:100)
        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)
        ... 46 more
        pom.xml /Mail   line 1  Maven Dependency Problem 

或者,当我从 RAD 内部运行 Maven 时,这个:

Or, when I run Maven from inside RAD, this:

[错误] 无法在项目邮件上执行目标:无法解析项目 com.ibm.gs.houston:Mail:adapter:1.0-SNAPSHOT 的依赖项:未能在以下位置收集依赖项com.itextpdf:itext-licensekey:jar:2.0.3: 无法读取工件com.itextpdf:itext-licensekey:jar:2.0.3 的描述符:无法从/到传输工件 com.itextpdf:itext-licensekey:pom:2.0.3iText (https://repo.itextsupport.com/releases):不合适协议,可能没有指定合适的密码套件或协议已停用 -> [帮助 1]

我怀疑这不仅仅是 这个站点,而是任何站点不再支持 SSLv3.我也在 WebSphere 中看到过,当时它有 设置为SSL_TLS",显然不支持 TLS 1.1 或 1.2.找到我希望的正确 RAD 属性文件来解决该设置,似乎没有任何区别.

I suspect it's not just this site, but any site that no longer supports SSLv3. I've seen this in WebSphere too, when it had a setting to "SSL_TLS", which apparently doesn't do TLS 1.1 or 1.2. Finding what I hoped was the right RAD property file to address that setting, didn't seem to make any difference.

从 Eclipse 配置细节中,我看到:

From the Eclipse configuration details, I see:

com.ibm.SSL.ConfigURL=file:C:\Program Files\IBM\SDP/runtimes/base_stub/properties/ssl.client.props

但是在那里更改设置并没有帮助.

But changing settings there hasn't helped.

推荐答案

RAD 9.6 的最新更新使用 Maven M2E 1.8.3,该版本未遇到该错误.解决方案是通过 IBM Installation Manager 更新您的 RAD 9.6 安装.

The latest update to RAD 9.6 uses Maven M2E 1.8.3, which does not experience the bug. The solution is to update your RAD 9.6 installation through IBM Installation Manager.

这篇关于RAD/Eclipse 的 Maven https 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 23:15