generated from youfool-project/youfool-prj-springboot3-template
163 lines
6.8 KiB
XML
163 lines
6.8 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>com.chinaweal.youfool</groupId>
|
||
<artifactId>youfool-prj-springboot3-template</artifactId>
|
||
<version>1.0.0</version>
|
||
<packaging>jar</packaging>
|
||
<name>${project.artifactId}</name>
|
||
<url>https://www.chinaweal.com.cn</url>
|
||
<description>boot基础的后台模板</description>
|
||
<properties>
|
||
<java.version>21</java.version>
|
||
<skipTests>true</skipTests>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<maven.compiler.source>21</maven.compiler.source>
|
||
<maven.compiler.target>21</maven.compiler.target>
|
||
<maven.compiler.compilerVersion>21</maven.compiler.compilerVersion>
|
||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||
<spring.boot.version>3.4.5</spring.boot.version>
|
||
<skipTests>true</skipTests>
|
||
</properties>
|
||
|
||
<dependencyManagement>
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-dependencies</artifactId>
|
||
<version>${spring.boot.version}</version>
|
||
<type>pom</type>
|
||
<scope>import</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
</dependencyManagement>
|
||
|
||
<dependencies>
|
||
<!--基础框架youfool-framework-boot-->
|
||
<dependency>
|
||
<groupId>com.chinaweal.youfool</groupId>
|
||
<artifactId>youfool-framework-springboot3</artifactId>
|
||
<version>1.0.4</version>
|
||
</dependency>
|
||
<!--达梦 DM8 驱动-->
|
||
<dependency>
|
||
<groupId>com.dameng</groupId>
|
||
<artifactId>DmJdbcDriver18</artifactId>
|
||
<version>8.1.1.193</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
<version>1.18.42</version>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.security</groupId>
|
||
<artifactId>spring-security-crypto</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>junit</groupId>
|
||
<artifactId>junit</artifactId>
|
||
<version>4.12</version>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<build>
|
||
<finalName>${project.artifactId}</finalName>
|
||
<plugins>
|
||
<!-- 分离依赖 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-dependency-plugin</artifactId>
|
||
<version>3.8.1</version>
|
||
<executions>
|
||
<execution>
|
||
<id>copy-dependencies</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>copy-dependencies</goal>
|
||
</goals>
|
||
<configuration>
|
||
<!-- 依赖输出目录 -->
|
||
<outputDirectory>${project.build.directory}/libs</outputDirectory>
|
||
<!-- 排除传递依赖中的可选依赖 -->
|
||
<excludeGroupIds>org.projectlombok</excludeGroupIds>
|
||
<!-- <excludeOptional>true</excludeOptional>-->
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<!-- 配置 Spring Boot 打包插件 -->
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
<version>${spring.boot.version}</version>
|
||
<configuration>
|
||
<!-- 不打包依赖 -->
|
||
<layout>ZIP</layout>
|
||
<includes>
|
||
<include>
|
||
<groupId>nothing</groupId>
|
||
<artifactId>nothing</artifactId>
|
||
</include>
|
||
</includes>
|
||
</configuration>
|
||
<executions>
|
||
<execution>
|
||
<goals>
|
||
<goal>repackage</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<!-- 配置编译器,添加 -parameters 参数 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<version>3.14.1</version> <!-- 适配 JDK 17 的版本 -->
|
||
<configuration>
|
||
<source>21</source>
|
||
<target>21</target>
|
||
<!-- 显式指定编译器参数,保留方法参数名 -->
|
||
<compilerArgs>
|
||
<arg>-parameters</arg>
|
||
</compilerArgs>
|
||
</configuration>
|
||
</plugin>
|
||
<!-- 代码风格检测插件 checkstyle -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||
<version>3.1.1</version>
|
||
<configuration>
|
||
<!--encoding和consoleOutput一般配套使用,consoleOutput用来设置是否输出相关检查语句,encoding用来设置输出语句的编码格式-->
|
||
<encoding>utf-8</encoding>
|
||
<consoleOutput>true</consoleOutput>
|
||
<!-- 如果在检测中出现error,则打包程序会在checkstyle程序检查完成后停下来 -->
|
||
<failsOnError>true</failsOnError>
|
||
<!-- 是否包括测试类 -->
|
||
<includeTestSourceDirectory>false</includeTestSourceDirectory>
|
||
<!-- 自定义配置目录 -->
|
||
<configLocation>checkstyle-v1.0.xml</configLocation>
|
||
</configuration>
|
||
<executions>
|
||
<execution>
|
||
<id>validate</id>
|
||
<phase>validate</phase>
|
||
<goals>
|
||
<!-- checkstyle:check目标是一个普通目标,它向控制台报告违规情况和/或在发生违规情况时使构建失败 -->
|
||
<goal>check</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
</project>
|