mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 10:57:13 +08:00 
			
		
		
		
	build: 优化打包配置
This commit is contained in:
		| @@ -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> | ||||
| @@ -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> | ||||
| @@ -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> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user