271 lines
10 KiB
XML
271 lines
10 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
<parent>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-parent</artifactId>
|
||
<version>2.7.18</version>
|
||
<relativePath/> <!-- lookup parent from repository -->
|
||
</parent>
|
||
<groupId>com.example</groupId>
|
||
<artifactId>workutils</artifactId>
|
||
<version>1.0.1-SNAPSHOT</version>
|
||
<name>workutils</name>
|
||
<description>workutils</description>
|
||
<properties>
|
||
<java.version>17</java.version>
|
||
<maven.compiler.source>17</maven.compiler.source>
|
||
<maven.compiler.target>17</maven.compiler.target>
|
||
<maven.compiler.release>17</maven.compiler.release>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||
<!-- Maven 编译/测试启动时的 JVM 参数,确保 IDEA 内运行不乱码 -->
|
||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||
<!-- OpenJFX 版本 -->
|
||
<javafx.version>17.0.14</javafx.version>
|
||
<!-- AtlantaFX 版本 -->
|
||
<atlantafx.version>2.0.1</atlantafx.version>
|
||
</properties>
|
||
<repositories>
|
||
<!-- 本地文件仓库:存放外部 jar,随项目分发 -->
|
||
<repository>
|
||
<id>local-lib-repo</id>
|
||
<url>file://${project.basedir}/lib</url>
|
||
</repository>
|
||
<!-- AtlantaFX Maven 仓库 -->
|
||
<repository>
|
||
<id>sonatype-snapshots</id>
|
||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
|
||
<snapshots><enabled>true</enabled></snapshots>
|
||
</repository>
|
||
</repositories>
|
||
|
||
<dependencies>
|
||
|
||
<!-- MyBatis Generator Core -->
|
||
<dependency>
|
||
<groupId>org.mybatis.generator</groupId>
|
||
<artifactId>mybatis-generator-core</artifactId>
|
||
<version>1.4.2</version>
|
||
</dependency>
|
||
|
||
<!-- MySQL Connector -->
|
||
<dependency>
|
||
<groupId>mysql</groupId>
|
||
<artifactId>mysql-connector-java</artifactId>
|
||
<version>5.1.47</version>
|
||
</dependency>
|
||
|
||
<!-- OceanBase JDBC Driver(OB MySQL 模式元数据 API 兼容) -->
|
||
<dependency>
|
||
<groupId>com.oceanbase</groupId>
|
||
<artifactId>oceanbase-client</artifactId>
|
||
<version>2.4.12</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>com.alibaba</groupId>
|
||
<artifactId>fastjson</artifactId>
|
||
<version>2.0.57</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>com.github.jsqlparser</groupId>
|
||
<artifactId>jsqlparser</artifactId>
|
||
<version>4.5</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter</artifactId>
|
||
<exclusions>
|
||
<exclusion>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-logging</artifactId>
|
||
</exclusion>
|
||
</exclusions>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>com.opencsv</groupId>
|
||
<artifactId>opencsv</artifactId>
|
||
<version>5.2</version> <!-- 确保使用最新版本 -->
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-test</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
|
||
<!-- Apache Commons IO for working with files -->
|
||
<dependency>
|
||
<groupId>commons-io</groupId>
|
||
<artifactId>commons-io</artifactId>
|
||
<version>2.11.0</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>ch.qos.logback</groupId>
|
||
<artifactId>logback-classic</artifactId>
|
||
<version>1.2.12</version>
|
||
</dependency>
|
||
|
||
<!-- 将 Log4j2 API 调用桥接到 SLF4J,避免 "Log4j2 could not find a logging implementation" 警告 -->
|
||
<dependency>
|
||
<groupId>org.apache.logging.log4j</groupId>
|
||
<artifactId>log4j-to-slf4j</artifactId>
|
||
<version>2.20.0</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>com.alibaba</groupId>
|
||
<artifactId>easyexcel</artifactId>
|
||
<version>3.1.1</version>
|
||
<exclusions>
|
||
<exclusion>
|
||
<groupId>org.apache.logging.log4j</groupId>
|
||
<artifactId>log4j-core</artifactId>
|
||
</exclusion>
|
||
<exclusion>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>slf4j-log4j12</artifactId>
|
||
</exclusion>
|
||
</exclusions>
|
||
</dependency>
|
||
|
||
<!-- ==================== JavaFX 17 (OpenJFX) ==================== -->
|
||
<dependency>
|
||
<groupId>org.openjfx</groupId>
|
||
<artifactId>javafx-controls</artifactId>
|
||
<version>${javafx.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.openjfx</groupId>
|
||
<artifactId>javafx-web</artifactId>
|
||
<version>${javafx.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.openjfx</groupId>
|
||
<artifactId>javafx-fxml</artifactId>
|
||
<version>${javafx.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.openjfx</groupId>
|
||
<artifactId>javafx-base</artifactId>
|
||
<version>${javafx.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.openjfx</groupId>
|
||
<artifactId>javafx-graphics</artifactId>
|
||
<version>${javafx.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.openjfx</groupId>
|
||
<artifactId>javafx-swing</artifactId>
|
||
<version>${javafx.version}</version>
|
||
</dependency>
|
||
|
||
<!-- ==================== AtlantaFX 现代 UI 主题 ==================== -->
|
||
<dependency>
|
||
<groupId>io.github.mkpaz</groupId>
|
||
<artifactId>atlantafx-base</artifactId>
|
||
<version>${atlantafx.version}</version>
|
||
</dependency>
|
||
|
||
<!-- JNA: 用于 Windows 控制台代码页切换 (UTF-8) -->
|
||
<dependency>
|
||
<groupId>net.java.dev.jna</groupId>
|
||
<artifactId>jna</artifactId>
|
||
<version>5.14.0</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>net.java.dev.jna</groupId>
|
||
<artifactId>jna-platform</artifactId>
|
||
<version>5.14.0</version>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
<configuration>
|
||
<mainClass>com.example.workutils.WorkUtilsApplication</mainClass>
|
||
<excludes>
|
||
<exclude>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
</exclude>
|
||
</excludes>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||
<artifactId>launch4j-maven-plugin</artifactId>
|
||
<version>2.5.3</version>
|
||
<executions>
|
||
<execution>
|
||
<id>l4j-exe</id>
|
||
<phase>package</phase>
|
||
<goals><goal>launch4j</goal></goals>
|
||
<configuration>
|
||
<headerType>console</headerType>
|
||
<jar>${project.build.directory}/${project.build.finalName}.jar</jar>
|
||
<outfile>${project.build.directory}/workutils.exe</outfile>
|
||
<dontWrapJar>false</dontWrapJar>
|
||
<classPath>
|
||
<mainClass>org.springframework.boot.loader.JarLauncher</mainClass>
|
||
</classPath>
|
||
<jre>
|
||
<minVersion>1.8.0</minVersion>
|
||
<opts>
|
||
<opt>-Dfile.encoding=UTF-8</opt>
|
||
</opts>
|
||
</jre>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<!-- 复制启动脚本到 target 目录 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-resources-plugin</artifactId>
|
||
<version>3.2.0</version>
|
||
<executions>
|
||
<execution>
|
||
<id>copy-start-scripts</id>
|
||
<phase>package</phase>
|
||
<goals><goal>copy-resources</goal></goals>
|
||
<configuration>
|
||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||
<resources>
|
||
<resource>
|
||
<directory>${basedir}/scripts</directory>
|
||
<includes>
|
||
<include>start.bat</include>
|
||
<include>start-jar.bat</include>
|
||
</includes>
|
||
</resource>
|
||
</resources>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
</plugins>
|
||
</build>
|
||
|
||
</project>
|