Skip to content

Commit

Permalink
build: 优化打包配置
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Aug 10, 2024
1 parent 2c1eb56 commit 75cef77
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions continew-admin-webapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<!-- 启动类 -->
<main-class>top.continew.admin.ContiNewAdminApplication</main-class>
<!-- 程序 jar 输出目录 -->
<bin-path>bin</bin-path>
<bin-path>bin/</bin-path>
<!-- 配置文件输出目录 -->
<config-path>config</config-path>
<config-path>config/</config-path>
<!-- 依赖 jar 输出目录 -->
<lib-path>lib</lib-path>
<lib-path>lib/</lib-path>
</properties>

<dependencies>
Expand Down Expand Up @@ -75,19 +75,22 @@
<!-- 排除配置文件 -->
<excludes>
<exclude>${config-path}/</exclude>
<exclude>db/</exclude>
<exclude>templates/</exclude>
<exclude>logback-spring.xml</exclude>
</excludes>
<archive>
<manifest>
<mainClass>${main-class}</mainClass>
<!-- 为 MANIFEST.MF 中的 Class-Path 加入依赖 jar 目录前缀 -->
<classpathPrefix>../${lib-path}/</classpathPrefix>
<classpathPrefix>../${lib-path}</classpathPrefix>
<addClasspath>true</addClasspath>
<!-- jar 包不包含唯一版本标识 -->
<useUniqueVersions>false</useUniqueVersions>
</manifest>
<manifestEntries>
<!--为 MANIFEST.MF 中的 Class-Path 加入配置文件目录前缀 -->
<Class-Path>../${config-path}/</Class-Path>
<Class-Path>../${config-path}</Class-Path>
</manifestEntries>
</archive>
<outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
Expand Down Expand Up @@ -123,14 +126,19 @@
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/resources/${config-path}</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>${config-path}/</include>
<include>db/</include>
<include>templates/</include>
<include>logback-spring.xml</include>
</includes>
</resource>
</resources>
<outputDirectory>${project.build.directory}/app</outputDirectory>
<outputDirectory>${project.build.directory}/app/${config-path}</outputDirectory>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 75cef77

Please sign in to comment.