Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Maven Profile根据JDK自动判断打包配置 #325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slankka
Copy link
Contributor

@slankka slankka commented Dec 1, 2021

打包方式:

java 1.8

mvn clean jfx:jar

java11

mvn clean package

更新说明:

使用JDK11 运行mvn clean jfx:jar,会导致com.zenjava:javafx-maven-plugin打包失败。因为这个插件仅支持Java8。不支持后续版本。

另外如果配置使用org.openjfx:javafx-maven-plugin 则需要配置module-info.java,还有待商榷。

测试说明

  • Amazon Corectto 11,编译通过。(无法直接打开jar)
  • Liberica 11 (Full),编译通过,也可以打开jar。

额外注意事项

使用 maven-shade-plugin打包的jar,需要复制 src/main/resources/lib到 jar的同级目录,否则找不到驱动。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant