chore: 完善 flatten Maven 插件配置,以覆盖更多使用情况

This commit is contained in:
Charles7c 2024-01-18 20:19:13 +08:00
parent bee04d5f36
commit 657accd8a5
2 changed files with 34 additions and 8 deletions

3
.gitignore vendored
View File

@ -33,6 +33,9 @@ build/
### VS Code ### ### VS Code ###
.vscode/ .vscode/
# Maven ignore
.flattened-pom.xml
### Temp ### ### Temp ###
*.log *.log
*.logs *.logs

39
pom.xml
View File

@ -33,9 +33,8 @@
</modules> </modules>
<properties> <properties>
<!-- 项目版本 -->
<revision>2.3.0-SNAPSHOT</revision> <revision>2.3.0-SNAPSHOT</revision>
<!-- Maven Plugin Versions -->
<spotless.version>2.40.0</spotless.version>
</properties> </properties>
<!-- 全局依赖版本管理 --> <!-- 全局依赖版本管理 -->
@ -45,35 +44,35 @@
<dependency> <dependency>
<groupId>top.charles7c.continew</groupId> <groupId>top.charles7c.continew</groupId>
<artifactId>continew-admin-webapi</artifactId> <artifactId>continew-admin-webapi</artifactId>
<version>${project.version}</version> <version>${revision}</version>
</dependency> </dependency>
<!-- 系统监控模块(存放系统监控模块相关功能,例如:日志管理、服务监控等) --> <!-- 系统监控模块(存放系统监控模块相关功能,例如:日志管理、服务监控等) -->
<dependency> <dependency>
<groupId>top.charles7c.continew</groupId> <groupId>top.charles7c.continew</groupId>
<artifactId>continew-admin-monitor</artifactId> <artifactId>continew-admin-monitor</artifactId>
<version>${project.version}</version> <version>${revision}</version>
</dependency> </dependency>
<!-- 系统管理模块(存放系统管理模块相关功能,例如:部门管理、角色管理、用户管理等) --> <!-- 系统管理模块(存放系统管理模块相关功能,例如:部门管理、角色管理、用户管理等) -->
<dependency> <dependency>
<groupId>top.charles7c.continew</groupId> <groupId>top.charles7c.continew</groupId>
<artifactId>continew-admin-system</artifactId> <artifactId>continew-admin-system</artifactId>
<version>${project.version}</version> <version>${revision}</version>
</dependency> </dependency>
<!-- 系统工具模块(存放系统工具模块相关功能,例如:代码生成、文件管理等) --> <!-- 系统工具模块(存放系统工具模块相关功能,例如:代码生成、文件管理等) -->
<dependency> <dependency>
<groupId>top.charles7c.continew</groupId> <groupId>top.charles7c.continew</groupId>
<artifactId>continew-admin-tool</artifactId> <artifactId>continew-admin-tool</artifactId>
<version>${project.version}</version> <version>${revision}</version>
</dependency> </dependency>
<!-- 公共模块(存放公共工具类,公共配置等) --> <!-- 公共模块(存放公共工具类,公共配置等) -->
<dependency> <dependency>
<groupId>top.charles7c.continew</groupId> <groupId>top.charles7c.continew</groupId>
<artifactId>continew-admin-common</artifactId> <artifactId>continew-admin-common</artifactId>
<version>${project.version}</version> <version>${revision}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
@ -110,7 +109,6 @@
<plugin> <plugin>
<groupId>com.diffplug.spotless</groupId> <groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId> <artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<executions> <executions>
<execution> <execution>
<phase>compile</phase> <phase>compile</phase>
@ -131,6 +129,31 @@
</java> </java>
</configuration> </configuration>
</plugin> </plugin>
<!-- 统一版本号插件 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</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> </plugins>
</build> </build>