148 lines
5.5 KiB
XML
148 lines
5.5 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.yinlihupo</groupId>
|
|
<artifactId>enlish</artifactId>
|
|
<version>${revision}</version>
|
|
|
|
<!-- 项目名称 -->
|
|
<name>${project.artifactId}</name>
|
|
<!-- 项目描述 -->
|
|
<description>智能化英语教学</description>
|
|
|
|
<!-- 多模块项目需要配置打包方式为 pom -->
|
|
<packaging>pom</packaging>
|
|
|
|
<!-- 子模块管理 -->
|
|
<modules>
|
|
<module>enlish-service</module>
|
|
</modules>
|
|
|
|
<properties>
|
|
<!-- 项目版本号 -->
|
|
<revision>0.0.1-SNAPSHOT</revision>
|
|
<!-- JDK 版本 -->
|
|
<java.version>17</java.version>
|
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
|
<!-- 项目编码 -->
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<!-- Maven 相关版本号 -->
|
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
|
|
|
<!-- 依赖包版本 -->
|
|
<lombok.version>1.18.30</lombok.version>
|
|
<spring-boot.version>3.4.12</spring-boot.version>
|
|
|
|
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
|
|
</properties>
|
|
|
|
<!-- 统一依赖管理 -->
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
|
|
<!-- 避免编写那些冗余的 Java 样板式代码,如 get、set 等 -->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</dependency>
|
|
<!-- Spring Boot 官方依赖管理 -->
|
|
<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>
|
|
|
|
<build>
|
|
<!-- 统一插件管理 -->
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>repackage</id>
|
|
<goals>
|
|
<goal>repackage</goal> <!-- 将依赖的 Jar 一起打包 -->
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>${maven-compiler-plugin.version}</version>
|
|
<configuration>
|
|
<source>${java.version}</source>
|
|
<target>${java.version}</target>
|
|
<encoding>${project.build.sourceEncoding}</encoding>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
|
|
<plugins>
|
|
<!-- 统一 revision 版本, 解决子模块打包无法解析 ${revision} 版本号问题 -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>flatten-maven-plugin</artifactId>
|
|
<version>${flatten-maven-plugin.version}</version>
|
|
<configuration>
|
|
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
|
<updatePomFile>true</updatePomFile>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>flatten</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>flatten</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>flatten.clean</id>
|
|
<phase>clean</phase>
|
|
<goals>
|
|
<goal>clean</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
<!-- 添加华为云、阿里云 maven 中央仓库,提升依赖下载速度 -->
|
|
<repositories>
|
|
<repository>
|
|
<id>huaweicloud</id>
|
|
<name>huawei</name>
|
|
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
|
</repository>
|
|
<repository>
|
|
<id>aliyunmaven</id>
|
|
<name>aliyun</name>
|
|
<url>https://maven.aliyun.com/repository/public</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
</project>
|