代码拉取完成,页面将自动刷新
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rocoplayer</groupId>
<artifactId>JavaFX-Template-Native</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<javafx.version>21-ea+17</javafx.version>
<!--JAVA_HOME路径-->
<javahome.path>D:/myProgram/jdk-17.0.7</javahome.path>
<!-- 打包、镜像 统一名称 -->
<pkg.imagename>JavaFx-APP</pkg.imagename>
<!--厂商 -->
<pkg.vendor>xxx有限公司</pkg.vendor>
<!-- 描述 -->
<pkg.description>JavaFx-APP-Demo</pkg.description>
<!-- 版权 -->
<pkg.copyright>rocoplayer.com</pkg.copyright>
<!-- 版本号 -->
<pkg.version>1.0.0</pkg.version>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>9.0.10</version>
</dependency>
<dependency>
<groupId>commons-math</groupId>
<artifactId>commons-math</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/commons-math3-3.6.1.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-lang3</groupId>
<artifactId>commons-lang3</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/commons-lang3-3.14.0.jar</systemPath>
</dependency>
<dependency>
<groupId>netty</groupId>
<artifactId>netty</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/netty-all-4.1.59.Final.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
<!-- javafx jlink 打包插件 -->
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<!-- 这里配置java和jlink程序 -->
<executable>${javahome.path}/bin/java</executable>
<jlinkExecutable>${javahome.path}/bin/jlink</jlinkExecutable>
<release>${maven.compiler.release}</release>
<mainClass>com.rocoplayer/com.rocoplayer.app.App</mainClass>
<compress>1</compress>
<stripDebug>true</stripDebug>
<noHeaderFiles>true</noHeaderFiles>
<noManPages>true</noManPages>
<launcher>launcher</launcher>
<jlinkImageName>${pkg.imagename}</jlinkImageName>
<!--有些模块化需要可以自行加命令,注意下面两个插件的java-options也要一样 -->
<options>
<option>--add-exports javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix</option>
<option>--add-exports javafx.base/com.sun.javafx.event=com.jfoenix</option>
<option>--add-exports javafx.controls/javafx.scene.control=com.google.gson</option>
<option>--add-opens com.jfoenix/com.jfoenix.controls.datamodels.treetable=com.google.gson</option>
</options>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>image</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<!-- 这里配置jpackage程序 -->
<executable>${javahome.path}/bin/jpackage</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>-n</argument>
<!-- native [exe] name -->
<argument>${pkg.imagename}</argument>
<argument>-t</argument>
<argument>app-image</argument>
<argument>--java-options</argument>
<argument>-Dfile.encoding=GBK --add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix --add-exports=javafx.base/com.sun.javafx.event=com.jfoenix --add-exports=javafx.controls/javafx.scene.control=com.google.gson --add-opens=com.jfoenix/com.jfoenix.controls.datamodels.treetable=com.google.gson</argument>
<argument>-d</argument>
<argument>${project.build.directory}/nativeBuild</argument>
<argument>-m</argument>
<argument>com.rocoplayer/com.rocoplayer.app.App</argument>
<argument>--icon</argument>
<argument>
${project.basedir}/src/main/resources/com/rocoplayer/app/icon/icon.ico
</argument>
<argument>--runtime-image</argument>
<argument>${project.build.directory}/${pkg.imagename}</argument>
<argument>--app-version</argument>
<argument>${pkg.version}</argument>
<argument>--copyright</argument>
<argument>${pkg.copyright}</argument>
<argument>--vendor</argument>
<argument>${pkg.vendor}</argument>
<argument>--description</argument>
<argument>${pkg.description}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>installer</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>jpackage</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>-n</argument>
<argument>${pkg.imagename}</argument>
<argument>-t</argument>
<argument>exe</argument>
<argument>--win-shortcut</argument>
<argument>--win-menu</argument>
<argument>--win-dir-chooser</argument>
<argument>--java-options</argument>
<argument>-Dfile.encoding=GBK --add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix --add-exports=javafx.base/com.sun.javafx.event=com.jfoenix --add-exports=javafx.controls/javafx.scene.control=com.google.gson --add-opens=com.jfoenix/com.jfoenix.controls.datamodels.treetable=com.google.gson</argument>
<argument>-d</argument>
<argument>${project.build.directory}/nativeBuild</argument>
<argument>-m</argument>
<argument>com.rocoplayer/com.rocoplayer.app.App</argument>
<argument>--icon</argument>
<argument>
${project.basedir}/src/main/resources/com/rocoplayer/app/icon/icon.ico
</argument>
<argument>--runtime-image</argument>
<argument>${project.build.directory}/${pkg.imagename}</argument>
<argument>--app-version</argument>
<argument>${pkg.version}</argument>
<argument>--copyright</argument>
<argument>${pkg.copyright}</argument>
<argument>--vendor</argument>
<argument>${pkg.vendor}</argument>
<argument>--description</argument>
<argument>${pkg.description}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。