【发布时间】:2020-04-30 12:01:20
【问题描述】:
我目前正在使用 maven 开发 Openjfx 项目(适用于 Windows),所以我的 POM 中有:
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>12.0.2</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>12.0.2</version>
</dependency>
由于流行病,我不得不旅行,我被困在另一个城市,只有我的 macbook。
我被要求对项目进行一些更改。现在我想生成带有 windows 依赖项的 jar,但 maven 只下载 mac 版本。
javafx-controls-12.0.2-mac.jar
javafx-graphics-12.0.2-mac.jar
javafx-base-12.0.2-mac.jar
javafx-fxml-12.0.2-mac.jar
有没有办法在mac中强制下载win版本的文件?
PS:我还使用 Apache Maven Shade 插件将 Openjfx 文件打包到 jar 中。
【问题讨论】:
-
它正在我的 Mac 中同时下载
javafx-fxml-12.0.2-mac.jar和javafx-fxml-12.0.2.jar。你确定你没有在你的pom.xml中配置任何profiles基于操作系统,就像这里的第二个答案中提到的那样:stackoverflow.com/questions/7650727/… -
是的,它们也在被下载,但缺少的是 javafx-controls-12.0.2-win.jar 等等......
标签: java maven javafx maven-shade-plugin