Files
gnu_java_utils_library/pom.xml
T
database-mysql 6c843c4030 fix: 修复质量插件在 Java 21 下不可用,并修复 SpotBugs 发现的空指针风险
- checkstyle: 升级至 3.6.0,新增 checkstyle.xml 基础规则,绑定 verify 阶段
- findbugs: 替换为 spotbugs-maven-plugin 4.8.6.6(FindBugs 已停止维护且无法解析 Java 21 字节码),
  绑定 verify 阶段,新增 spotbugs-exclude.xml 排除遗留命名等检查
- javadoc: 升级至 3.12.0(3.12.1 在中央仓库不存在),禁用 doclint
- 修复 SpotBugs 发现的问题:压缩/解压方法中 getFileName()/getParent() 可能为 null 的防御,
  共享 SecureRandom 实例避免重复创建
2026-11-02 09:56:28 +08:00

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.7-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>