使用 flatten-maven-plugin 优化项目

This commit is contained in:
卢春梦 2024-03-09 16:16:59 +08:00
parent 55b092665b
commit 84f5f218b7
20 changed files with 182 additions and 65 deletions

4
.gitignore vendored
View File

@ -25,3 +25,7 @@ Thumbs.db
*.war
*.ear
/target
# Flattened pom
.flattened-pom.xml
/**/.flattened-pom.xml

38
blade-core-bom/pom.xml Normal file
View File

@ -0,0 +1,38 @@
<?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">
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-bom</artifactId>
<name>${project.artifactId}</name>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${maven-flatten.version}</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>oss</flattenMode>
<pomElements>
<dependencyManagement>expand</dependencyManagement>
<pluginManagement>remove</pluginManagement>
<dependencies>remove</dependencies>
<properties>remove</properties>
<repositories>remove</repositories>
</pomElements>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -5,14 +5,13 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-boot</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -35,38 +34,31 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-launch</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-secure</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-log</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-swagger</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--MyBatis-->
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-mybatis</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>

View File

@ -5,13 +5,12 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-cloud</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
@ -20,7 +19,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-secure</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Feign-->
<dependency>

View File

@ -5,20 +5,18 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-crypto</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>

View File

@ -5,13 +5,12 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-datascope</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -19,7 +18,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-mybatis</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Jdbc-->
<dependency>

View File

@ -5,13 +5,12 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-develop</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -19,7 +18,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Mybatis-Plus-->
<dependency>

View File

@ -5,14 +5,13 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-launch</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>

View File

@ -5,14 +5,13 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-loadbalancer</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>

View File

@ -5,14 +5,13 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-log</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -20,17 +19,14 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-secure</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Mybatis-->
<dependency>

View File

@ -5,14 +5,13 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-mybatis</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -36,7 +35,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-secure</artifactId>
<version>${blade.tool.version}</version>
</dependency>
</dependencies>

View File

@ -5,13 +5,12 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-oss</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -19,7 +18,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Aliyun-->
<dependency>

View File

@ -5,20 +5,18 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-report</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-mybatis</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>com.bstek.ureport</groupId>

View File

@ -5,14 +5,13 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-secure</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -31,7 +30,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Jdbc-->
<dependency>

View File

@ -5,13 +5,12 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-social</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -19,7 +18,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!-- 第三方登陆 -->
<dependency>

View File

@ -5,14 +5,13 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-swagger</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -20,7 +19,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!--Swagger-->
<dependency>

View File

@ -5,13 +5,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-test</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -19,7 +18,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-launch</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!-- Test -->
<dependency>

View File

@ -2,18 +2,16 @@
<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">
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-tool</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -21,7 +19,6 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-launch</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>

View File

@ -5,13 +5,12 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-core-transaction</artifactId>
<name>${project.artifactId}</name>
<version>${blade.tool.version}</version>
<packaging>jar</packaging>
<dependencies>
@ -19,12 +18,10 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-mybatis</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<!-- Cloud-->
<dependency>

129
pom.xml
View File

@ -2,10 +2,9 @@
<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>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.7.1</version>
<version>${revision}</version>
<packaging>pom</packaging>
<name>blade-tool</name>
<description>
@ -36,11 +35,12 @@
</scm>
<properties>
<blade.tool.version>3.7.1</blade.tool.version>
<!-- Blade-Tool Version -->
<revision>3.7.1</revision>
<!-- jdk Version -->
<java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>
<maven-flatten.version>1.3.0</maven-flatten.version>
<knife4j.version>4.3.0</knife4j.version>
<mybatis.version>3.5.13</mybatis.version>
<mybatis.spring.version>2.1.1</mybatis.spring.version>
@ -64,6 +64,7 @@
</properties>
<modules>
<module>blade-core-bom</module>
<module>blade-core-boot</module>
<module>blade-core-cloud</module>
<module>blade-core-develop</module>
@ -120,6 +121,98 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-auto</artifactId>
<version>${mica.auto.version}</version>
<scope>provided</scope>
</dependency>
<!-- blade tool -->
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-launch</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-develop</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-secure</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-social</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-log</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-test</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-swagger</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-mybatis</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-oss</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-transaction</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-loadbalancer</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-report</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-datascope</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-crypto</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -159,7 +252,6 @@
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-auto</artifactId>
<version>${mica.auto.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
@ -191,6 +283,31 @@
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${maven-flatten.version}</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>oss</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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>