mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 22:57:17 +08:00 
			
		
		
		
	build: 优化打包配置
This commit is contained in:
		| @@ -17,11 +17,11 @@ | |||||||
|         <!-- 启动类 --> |         <!-- 启动类 --> | ||||||
|         <main-class>top.continew.admin.ContiNewAdminApplication</main-class> |         <main-class>top.continew.admin.ContiNewAdminApplication</main-class> | ||||||
|         <!-- 程序 jar 输出目录 --> |         <!-- 程序 jar 输出目录 --> | ||||||
|         <bin-path>bin</bin-path> |         <bin-path>bin/</bin-path> | ||||||
|         <!-- 配置文件输出目录 --> |         <!-- 配置文件输出目录 --> | ||||||
|         <config-path>config</config-path> |         <config-path>config/</config-path> | ||||||
|         <!-- 依赖 jar 输出目录 --> |         <!-- 依赖 jar 输出目录 --> | ||||||
|         <lib-path>lib</lib-path> |         <lib-path>lib/</lib-path> | ||||||
|     </properties> |     </properties> | ||||||
|  |  | ||||||
|     <dependencies> |     <dependencies> | ||||||
| @@ -75,19 +75,22 @@ | |||||||
|                     <!-- 排除配置文件 --> |                     <!-- 排除配置文件 --> | ||||||
|                     <excludes> |                     <excludes> | ||||||
|                         <exclude>${config-path}/</exclude> |                         <exclude>${config-path}/</exclude> | ||||||
|  |                         <exclude>db/</exclude> | ||||||
|  |                         <exclude>templates/</exclude> | ||||||
|  |                         <exclude>logback-spring.xml</exclude> | ||||||
|                     </excludes> |                     </excludes> | ||||||
|                     <archive> |                     <archive> | ||||||
|                         <manifest> |                         <manifest> | ||||||
|                             <mainClass>${main-class}</mainClass> |                             <mainClass>${main-class}</mainClass> | ||||||
|                             <!-- 为 MANIFEST.MF 中的 Class-Path 加入依赖 jar 目录前缀 --> |                             <!-- 为 MANIFEST.MF 中的 Class-Path 加入依赖 jar 目录前缀 --> | ||||||
|                             <classpathPrefix>../${lib-path}/</classpathPrefix> |                             <classpathPrefix>../${lib-path}</classpathPrefix> | ||||||
|                             <addClasspath>true</addClasspath> |                             <addClasspath>true</addClasspath> | ||||||
|                             <!-- jar 包不包含唯一版本标识 --> |                             <!-- jar 包不包含唯一版本标识 --> | ||||||
|                             <useUniqueVersions>false</useUniqueVersions> |                             <useUniqueVersions>false</useUniqueVersions> | ||||||
|                         </manifest> |                         </manifest> | ||||||
|                         <manifestEntries> |                         <manifestEntries> | ||||||
|                             <!--为 MANIFEST.MF 中的 Class-Path 加入配置文件目录前缀 --> |                             <!--为 MANIFEST.MF 中的 Class-Path 加入配置文件目录前缀 --> | ||||||
|                             <Class-Path>../${config-path}/</Class-Path> |                             <Class-Path>../${config-path}</Class-Path> | ||||||
|                         </manifestEntries> |                         </manifestEntries> | ||||||
|                     </archive> |                     </archive> | ||||||
|                     <outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory> |                     <outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory> | ||||||
| @@ -123,14 +126,19 @@ | |||||||
|                         </goals> |                         </goals> | ||||||
|                         <configuration> |                         <configuration> | ||||||
|                             <resources> |                             <resources> | ||||||
|  |                                 <resource> | ||||||
|  |                                     <directory>src/main/resources/${config-path}</directory> | ||||||
|  |                                 </resource> | ||||||
|                                 <resource> |                                 <resource> | ||||||
|                                     <directory>src/main/resources</directory> |                                     <directory>src/main/resources</directory> | ||||||
|                                     <includes> |                                     <includes> | ||||||
|                                         <include>${config-path}/</include> |                                         <include>db/</include> | ||||||
|  |                                         <include>templates/</include> | ||||||
|  |                                         <include>logback-spring.xml</include> | ||||||
|                                     </includes> |                                     </includes> | ||||||
|                                 </resource> |                                 </resource> | ||||||
|                             </resources> |                             </resources> | ||||||
|                             <outputDirectory>${project.build.directory}/app</outputDirectory> |                             <outputDirectory>${project.build.directory}/app/${config-path}</outputDirectory> | ||||||
|                         </configuration> |                         </configuration> | ||||||
|                     </execution> |                     </execution> | ||||||
|                 </executions> |                 </executions> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user