修复 revision 在 Maven install、deploy 时,不替换为版本号的问题

This commit is contained in:
YunaiV 2023-09-06 20:41:52 +08:00
parent beb385aab4
commit fcca69d243
3 changed files with 8 additions and 16 deletions

View File

@ -37,6 +37,7 @@
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version> <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<!-- 看看咋放到 bom 里 --> <!-- 看看咋放到 bom 里 -->
<lombok.version>1.18.28</lombok.version> <lombok.version>1.18.28</lombok.version>
<spring.boot.version>2.7.14</spring.boot.version> <spring.boot.version>2.7.14</spring.boot.version>
@ -92,6 +93,10 @@
</annotationProcessorPaths> </annotationProcessorPaths>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
@ -100,6 +105,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId> <artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
<configuration> <configuration>
<flattenMode>resolveCiFriendliesOnly</flattenMode> <flattenMode>resolveCiFriendliesOnly</flattenMode>
<updatePomFile>true</updatePomFile> <updatePomFile>true</updatePomFile>

View File

@ -647,27 +647,12 @@
</dependencyManagement> </dependencyManagement>
<build> <build>
<!-- 定义使用插件的版本 -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins> <plugins>
<!-- 统一 revision 版本 --> <!-- 统一 revision 版本 -->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId> <artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
<configuration> <configuration>
<flattenMode>resolveCiFriendliesOnly</flattenMode> <flattenMode>resolveCiFriendliesOnly</flattenMode>
<updatePomFile>true</updatePomFile> <updatePomFile>true</updatePomFile>

View File

@ -111,6 +111,7 @@
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>