创建 quarkus 项目在解析扩展目录时失败

问题描述 投票:0回答:2

我用 Chocolatey 安装了 quarkus cli。我还安装了 Zulu 11 作为我的 Java 11,以及 maven 3.9.5。这些是按照教程创建简单的 quarkus 应用程序所需的要求。

然后我尝试使用 quarkus cli 创建一个 quarkus 项目。但是,我得到以下输出:


C:\Users\LeoBre\codebase\quarkustests>quarkus create app
Looking for the newly published extensions in registry.quarkus.io
[ERROR]  Unable to create project: Failed to resolve extension catalog of io.quarkus.platform:quarkus-bom:pom:3.5.0

C:\Users\LeoBre\codebase\quarkustests>quarkus create app --refresh
Looking for the newly published extensions in registry.quarkus.io
[ERROR]  Unable to create project: Quarkus extension registry registry.quarkus.io did not provide any extension catalog

C:\Users\LeoBre\codebase\quarkustests>quarkus create && cd code-with-quarkus
Creating an app (default project type, see --help).
[WARN]  Failed to resolve the Quarkus extension registry descriptor of registry.quarkus.io from public-repository 
(https://[CENSORED PRIVATE URL]/repository/maven-public/) having applied the mirrors and/or proxies from the Maven settings to registry.quarkus.io (https://registry.quarkus.io/maven). Re-trying with the original registry.quarkus.io repository configuration.
Looking for the newly published extensions in registry.quarkus.io
[ERROR]  Unable to create project: Failed to resolve extension catalog of io.quarkus.platform:quarkus-bom:pom:3.5.0

当失败时,我尝试使用 Maven 插件:

C:\Users\LeoBre\codebase\quarkustests>mvn io.quarkus.platform:quarkus-maven-plugin:3.5.0:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started -Dextensions='resteasy-reactive'
[INFO] Scanning for projects...
Downloading from public-repository: https://dnp-nexus-01.kscl.dev/repository/maven-public/io/quarkus/platform/quarkus-maven-plugin/3.5.0/quarkus-maven-plugin-3.5.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.822 s
[INFO] Finished at: 2023-11-03T11:33:44+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin io.quarkus.platform:quarkus-maven-plugin:3.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for io.quarkus.platform:quarkus-maven-plugin:jar:3.5.0: The following artifacts could not be resolved: io.quarkus.platform:quarkus-maven-plugin:pom:3.5.0 (absent): Could not transfer artifact io.quarkus.platform:quarkus-maven-plugin:pom:3.5.0 from/to public-repository (https://[CENSORED PRIVATE URL]/repository/maven-public/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

我认为问题可能与我组织的公共存储库的更改有关。

起初我以为this问题可能与之相关,但我什至没有达到他的程度。我是否可能在我的 quarkus 安装中搞砸了一些东西?或者我还有其他消息吗?

maven quarkus
2个回答
1
投票

问题是,我的公司使用自定义签名的 SSL 证书。它们存储在计算机上,但不在 Java 密钥库中。添加选项

-Djavax.net.ssl.trustStoreType=Windows-ROOT

有帮助。我最终将其添加到

JAVA_TOOL_OPTIONS
,这样就不必一直添加这个特定选项。


0
投票

我只是澄清@monamona 的答案:

您可以在这里添加:enter image description here -Djavax.net.ssl.trustStoreType=Windows-ROOT

或从命令行设置:

设置 JAVA_TOOL_OPTIONS=-Djavax.net.ssl.trustStoreType=Windows-ROOT

IDEA 中的结果例如: PS C:\Projects\ws-VTB�8\ms-soap-hc5> ./mvnw 编译 quarkus:dev 选择了 JAVA_TOOL_OPTIONS:-Djavax.net.ssl.trustStoreType=Windows-ROOT

© www.soinside.com 2019 - 2024. All rights reserved.