- 版本统一为 1.9-SNAPSHOT-Java21(pom / version 常量 / README / INFO) - 合并 main 新增的文件下载模块(单线程 + HTTP Range 多线程下载)与门面接口 - 修复多线程下载:块失败异常不再被静默吞掉(解包 ExecutionException 抛出 RuntimeException)、 文件小于线程数时收敛有效线程数、线程池 finally 关闭 - 测试适配:原 downloadfile 测试不匹配 surefire 规则且依赖内网,重写为本地 HttpServer 驱动的 DownloadFileTest(单线程/多线程/小文件边界/不支持断点续传抛错) - SpotBugs 排除规则补充下载模块的遗留命名;README 测试说明同步(58 个用例) - 验证:JDK 21 下 mvn clean verify 通过(58/58 测试 + checkstyle + SpotBugs 0 问题)
125 lines
4.7 KiB
XML
125 lines
4.7 KiB
XML
<?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>top.gtb520.java.gnu</groupId>
|
|
<artifactId>gnu_java_utils_library</artifactId>
|
|
<version>1.9-SNAPSHOT-Java21</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>GNU Java Utils Library</name>
|
|
<description>轻量级 Java 工具库:压缩/解压、终端彩色输出、文件创建与管理、文件加密/解密、随机数生成、硬件标识与运行时信息。</description>
|
|
<url>https://github.com/databasemysql233-debug/gnu_java_utils_library</url>
|
|
|
|
<licenses>
|
|
<license>
|
|
<name>Apache License, Version 2.0</name>
|
|
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
|
|
<distribution>repo</distribution>
|
|
</license>
|
|
</licenses>
|
|
|
|
<properties>
|
|
<maven.compiler.release>21</maven.compiler.release>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<junit.version>5.13.0</junit.version>
|
|
<surefire.version>3.6.0</surefire.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-compress</artifactId>
|
|
<version>1.28.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<version>${junit.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>${surefire.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.4.2</version>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
|
</manifest>
|
|
<manifestEntries>
|
|
<Automatic-Module-Name>top.gtb520.java.gnu.utils.library</Automatic-Module-Name>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
<version>3.6.0</version>
|
|
<configuration>
|
|
<configLocation>checkstyle.xml</configLocation>
|
|
<!-- <encoding>UTF-8</encoding>-->
|
|
<failOnViolation>true</failOnViolation>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>checkstyle-check</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>com.github.spotbugs</groupId>
|
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
|
<version>4.8.6.6</version>
|
|
<configuration>
|
|
<effort>Max</effort>
|
|
<threshold>Medium</threshold>
|
|
<failOnError>true</failOnError>
|
|
<xmlOutput>true</xmlOutput>
|
|
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>spotbugs-check</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<version>3.12.0</version>
|
|
<configuration>
|
|
<show>private</show>
|
|
<nohelp>true</nohelp>
|
|
<doclint>none</doclint>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|