You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
6.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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>xyz.wbsite</groupId>
<artifactId>jmacro</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<!--<packaging>war</packaging>--><!--需要打包成war时放开-->
<name>jmacro</name>
<description>project for jmacro</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>8</java.version>
<maven.test.skip>true</maven.test.skip>
</properties>
<repositories>
<!-- 将中央仓库地址指向阿里云聚合仓库,提高下载速度 -->
<repository>
<id>aliyun</id>
<name>Aliyun Repository</name>
<layout>default</layout>
<url>https://maven.aliyun.com/repository/public</url>
</repository>
</repositories>
<pluginRepositories>
<!-- 将插件的仓库指向阿里云聚合仓库解决低版本maven下载插件异常或提高下载速度 -->
<pluginRepository>
<id>aliyun</id>
<name>Aliyun Repository</name>
<url>https://maven.aliyun.com/repository/public</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.26</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.14.2.1</version>
</dependency>
<!-- java注册全局热键 -->
<dependency>
<groupId>com.melloware</groupId>
<artifactId>jintellitype</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
<build>
<finalName>${artifactId}-${version}</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<!-- 打包可执行文件 -->
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.8.3</version>
<configuration>
<!-- 启动类 -->
<mainClass>xyz.wbsite.jmacro.JMainApplication</mainClass>
<!-- 公司名称 -->
<vendor>${project.artifactId}</vendor>
<!-- 应用名称 ${project.build.finalName} = ${project.artifactId}-${project.version} -->
<appName>${project.artifactId}</appName>
<!-- 编译后的jfx/app下的jar包名称 -->
<jfxMainAppJarName>${project.artifactId}.jar</jfxMainAppJarName>
<!-- 发行版本 -->
<nativeReleaseVersion>${project.version}</nativeReleaseVersion>
<!--
图标设置
> 参考https://stackoverflow.com/questions/15880102/how-to-set-custom-icon-for-javafx-native-package-icon-on-windows
# 方式1按deployDir、appName配置读取ico文件
# 使用jfx:native打包时默认会去src/main/deploy/package/windows/${appName}.ico
<deployDir>${project.basedir}/src/main/deploy</deployDir>
# 方式2固定使用一个图标与版本号无关
# 优先级高于第一种方式
<bundleArguments>
<icon>${project.basedir}/src/main/resources/icon/icon.ico</icon>
</bundleArguments>
-->
<bundleArguments>
<icon>${project.basedir}/src/main/resources/icon.ico</icon>
</bundleArguments>
<!-- 桌面图标 -->
<needShortcut>true</needShortcut>
<!-- 菜单设置 -->
<needMenu>true</needMenu>
</configuration>
<executions>
<execution>
<id>create-jfx-jar</id>
<phase>package</phase>
<goals>
<goal>build-jar</goal>
</goals>
</execution>
<execution>
<id>create-exe</id>
<phase>package</phase>
<goals>
<goal>build-native</goal>
</goals>
</execution>
</executions>
</plugin>
<!--处理图例文件-->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<move file="${project.build.directory}/jfx/native/${project.artifactId}"
tofile="${project.build.directory}/${project.artifactId}-${project.version}"/>
<copydir src="${project.basedir}/legend"
dest="${project.build.directory}/${project.artifactId}-${project.version}/app/legend"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

Powered by TurnKey Linux.