|
|
|
@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
<?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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 核心同步:项目名与 Jenkinsfile 一致(cstatm23210465) -->
|
|
|
|
|
|
|
|
<groupId>org.atm</groupId>
|
|
|
|
|
|
|
|
<artifactId>cstatm23210465</artifactId>
|
|
|
|
|
|
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
|
|
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
|
|
|
|
<name>cstatm23210465</name>
|
|
|
|
|
|
|
|
<description>期中考试 cstatm23210465(完全适配 Jenkins 流水线)</description>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
|
|
|
|
<project.report.outputEncoding>UTF-8</project.report.outputEncoding>
|
|
|
|
|
|
|
|
<!-- 编译版本与 Jenkinsfile 的 JDK17 一致 -->
|
|
|
|
|
|
|
|
<maven.compiler.source>17</maven.compiler.source>
|
|
|
|
|
|
|
|
<maven.compiler.target>17</maven.compiler.target>
|
|
|
|
|
|
|
|
<maven.compiler.release>17</maven.compiler.release>
|
|
|
|
|
|
|
|
<!-- 插件版本统一管理,避免冲突 -->
|
|
|
|
|
|
|
|
<sonar-maven-plugin.version>3.10.0.2594</sonar-maven-plugin.version>
|
|
|
|
|
|
|
|
<maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
|
|
|
|
|
|
|
|
</properties>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
|
|
|
<!-- PostgreSQL 数据库依赖(版本保持原配置,避免兼容性问题) -->
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
|
|
<groupId>org.postgresql</groupId>
|
|
|
|
|
|
|
|
<artifactId>postgresql</artifactId>
|
|
|
|
|
|
|
|
<version>42.6.0</version>
|
|
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
<!-- 测试依赖 -->
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
|
|
<groupId>org.hamcrest</groupId>
|
|
|
|
|
|
|
|
<artifactId>hamcrest-all</artifactId>
|
|
|
|
|
|
|
|
<version>1.3</version>
|
|
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
|
|
|
|
<version>4.13.1</version>
|
|
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<build>
|
|
|
|
|
|
|
|
<plugins>
|
|
|
|
|
|
|
|
<!-- 1. SonarQube 扫描插件(与 Jenkinsfile 的 sonar:sonar 命令匹配) -->
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
|
|
|
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
|
|
|
|
|
|
|
<artifactId>sonar-maven-plugin</artifactId>
|
|
|
|
|
|
|
|
<version>${sonar-maven-plugin.version}</version>
|
|
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 2. 带依赖打包插件(与 Jenkinsfile 的 assembly:single 匹配,生成带依赖 JAR) -->
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
|
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
|
|
|
|
|
|
<version>${maven-assembly-plugin.version}</version>
|
|
|
|
|
|
|
|
<executions>
|
|
|
|
|
|
|
|
<execution>
|
|
|
|
|
|
|
|
<phase>package</phase>
|
|
|
|
|
|
|
|
<goals>
|
|
|
|
|
|
|
|
<goal>single</goal>
|
|
|
|
|
|
|
|
</goals>
|
|
|
|
|
|
|
|
<configuration>
|
|
|
|
|
|
|
|
<archive>
|
|
|
|
|
|
|
|
<manifest>
|
|
|
|
|
|
|
|
<!-- 主类与 Jenkinsfile 的 jpackage 阶段一致(com.atm.view.gui.Gui) -->
|
|
|
|
|
|
|
|
<mainClass>com.atm.view.gui.Gui</mainClass>
|
|
|
|
|
|
|
|
</manifest>
|
|
|
|
|
|
|
|
</archive>
|
|
|
|
|
|
|
|
<!-- 打包规则:包含所有依赖(与 Jenkinsfile 移动的 JAR 文件名匹配) -->
|
|
|
|
|
|
|
|
<descriptorRefs>
|
|
|
|
|
|
|
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|
|
|
|
|
|
|
</descriptorRefs>
|
|
|
|
|
|
|
|
</configuration>
|
|
|
|
|
|
|
|
</execution>
|
|
|
|
|
|
|
|
</executions>
|
|
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 3. 测试插件(跳过测试与 Jenkinsfile 的 -DskipTests 匹配,避免测试失败中断打包) -->
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
|
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
|
|
|
|
|
|
<version>3.1.2</version>
|
|
|
|
|
|
|
|
<configuration>
|
|
|
|
|
|
|
|
<skipTests>true</skipTests> <!-- 与 Jenkinsfile 的 -DskipTests 一致 -->
|
|
|
|
|
|
|
|
<argLine>${argLine} -Dfile.encoding=UTF-8</argLine>
|
|
|
|
|
|
|
|
</configuration>
|
|
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 4. 代码覆盖率插件(保持原配置,不影响流水线核心流程) -->
|
|
|
|
|
|
|
|
<plugin>
|
|
|
|
|
|
|
|
<groupId>org.jacoco</groupId>
|
|
|
|
|
|
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
|
|
|
|
|
|
<version>0.8.11</version>
|
|
|
|
|
|
|
|
<configuration>
|
|
|
|
|
|
|
|
<skip>false</skip>
|
|
|
|
|
|
|
|
<destFile>target/coverage-reports/jacoco-unit.exec</destFile>
|
|
|
|
|
|
|
|
<dataFile>target/coverage-reports/jacoco-unit.exec</dataFile>
|
|
|
|
|
|
|
|
</configuration>
|
|
|
|
|
|
|
|
<executions>
|
|
|
|
|
|
|
|
<execution>
|
|
|
|
|
|
|
|
<id>jacoco-initialize</id>
|
|
|
|
|
|
|
|
<goals>
|
|
|
|
|
|
|
|
<goal>prepare-agent</goal>
|
|
|
|
|
|
|
|
</goals>
|
|
|
|
|
|
|
|
</execution>
|
|
|
|
|
|
|
|
<execution>
|
|
|
|
|
|
|
|
<id>jacoco-site</id>
|
|
|
|
|
|
|
|
<phase>test</phase>
|
|
|
|
|
|
|
|
<goals>
|
|
|
|
|
|
|
|
<goal>report</goal>
|
|
|
|
|
|
|
|
</goals>
|
|
|
|
|
|
|
|
</execution>
|
|
|
|
|
|
|
|
</executions>
|
|
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
</plugins>
|
|
|
|
|
|
|
|
</build>
|
|
|
|
|
|
|
|
</project>
|