为什么使用jdeps和moditect生成依赖模块信息后jlink会失败?

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

我正在尝试使用以下方法创建我的 JavaFX 应用程序的运行时映像:

mvn clean javafx:jlink

我遵循了 SO 中关于如何使用 jdeps 和/或 moditect 生成我的自动模块依赖项 module-info.java 文件的各种指南。但是当运行上面的 jlink 命令时,它在 themoviedbapi:

上失败
Error: automatic module cannot be used with jlink: themoviedbapi from file:///C:/Users/user/.m2/repository/com/github/holgerbrandl/themoviedbapi/1.12/themoviedbapi-1.12.jar

我用来为 moditect 生成 moduleInfoSource 的 jdeps 命令是:

jdeps --generate-module-info work C:/Users/user/.m2/repository/com/github/holgerbrandl/themoviedbapi/1.12/themoviedbapi-1.12.jar

但与它所适用的其他错误不同,我得到了这个错误:

Error: Missing dependencies: classes not found from the module path and classpath.
To suppress this error, use --ignore-missing-deps to continue.

有人知道如何修复此错误以便我可以打包我的 JavaFX 应用程序吗?

这里是我的 GitHub 上存储库的链接,而不是复制和粘贴代码片段,您可以在其中看到 pom 等。 https://github.com/c-eg/ShowRenamer/tree/packaging

java javafx packaging jdeps moditect
© www.soinside.com 2019 - 2024. All rights reserved.