mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-12-08 09:01:41 +08:00
build: 优化打包配置,完善相关注释
This commit is contained in:
@@ -15,18 +15,6 @@
|
|||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
<description>API 及打包部署模块</description>
|
<description>API 及打包部署模块</description>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<!-- ### 打包配置相关 ### -->
|
|
||||||
<!-- 启动类 -->
|
|
||||||
<main-class>top.continew.admin.ContiNewAdminApplication</main-class>
|
|
||||||
<!-- 程序 jar 输出目录 -->
|
|
||||||
<bin-path>bin/</bin-path>
|
|
||||||
<!-- 配置文件输出目录 -->
|
|
||||||
<config-path>config/</config-path>
|
|
||||||
<!-- 依赖 jar 输出目录 -->
|
|
||||||
<lib-path>lib/</lib-path>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- 系统管理模块 -->
|
<!-- 系统管理模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -86,8 +74,10 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<!-- 是否跳过 Spring Boot 的重新打包操作 -->
|
||||||
|
<skip>${spring-boot.repackage.skip}</skip>
|
||||||
|
<!-- 是否将系统作用域的依赖包含进去 -->
|
||||||
<includeSystemScope>true</includeSystemScope>
|
<includeSystemScope>true</includeSystemScope>
|
||||||
<skip>${skip.boot.repackage}</skip>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
@@ -101,34 +91,35 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<!-- 默认 Spring Boot 胖包 模式 -->
|
<!-- 胖包模式:将依赖、配置文件等打包到 jar 包之内 -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>fat_jar</id>
|
<id>fat-jar</id>
|
||||||
<properties>
|
<properties>
|
||||||
<skip.boot.repackage>false</skip.boot.repackage>
|
<!-- 是否跳过 Spring Boot 的重新打包操作 -->
|
||||||
|
<spring-boot.repackage.skip>false</spring-boot.repackage.skip>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<!-- 瘦包 模式(可执行 JAR + lib + config) -->
|
<!-- 瘦包模式:将依赖、配置文件等打包到 jar 包之外 -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>slim_jar</id>
|
<id>thin-jar</id>
|
||||||
<!--默认-->
|
|
||||||
<activation>
|
<activation>
|
||||||
<activeByDefault>true</activeByDefault>
|
<activeByDefault>true</activeByDefault>
|
||||||
</activation>
|
</activation>
|
||||||
<properties>
|
<properties>
|
||||||
<skip.boot.repackage>true</skip.boot.repackage>
|
<!-- 是否跳过 Spring Boot 的重新打包操作 -->
|
||||||
|
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
|
||||||
<!-- 路径变量 -->
|
|
||||||
<lib-path>lib/</lib-path>
|
|
||||||
<config-path>config/</config-path>
|
|
||||||
<bin-path>bin/</bin-path>
|
|
||||||
<!-- 启动类 -->
|
<!-- 启动类 -->
|
||||||
<main-class>top.continew.admin.ContiNewAdminApplication</main-class>
|
<main-class>top.continew.admin.ContiNewAdminApplication</main-class>
|
||||||
|
<!-- 程序 jar 输出目录 -->
|
||||||
|
<bin-path>bin/</bin-path>
|
||||||
|
<!-- 配置文件输出目录 -->
|
||||||
|
<config-path>config/</config-path>
|
||||||
|
<!-- 依赖 jar 输出目录 -->
|
||||||
|
<lib-path>lib/</lib-path>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- 分离打包 JAR(不包含依赖) -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
@@ -157,7 +148,6 @@
|
|||||||
<outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
|
<outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- 拷贝依赖 jar -->
|
<!-- 拷贝依赖 jar -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@@ -175,7 +165,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- 拷贝配置文件 -->
|
<!-- 拷贝配置文件 -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@@ -206,7 +195,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|||||||
Reference in New Issue
Block a user