优化打包过程,配置自动放到jar包旁边并移除jar内部配置文件

pull/1371/head
648540858 2024-03-13 16:37:45 +08:00
parent d1624e2d06
commit da4ac962d0
1 changed files with 38 additions and 0 deletions

38
pom.xml
View File

@ -382,6 +382,44 @@
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<excludes>
<exclude>**/all-application.yml</exclude>
<exclude>**/application.yml</exclude>
<exclude>**/application-*.yml</exclude>
<exclude>**/local.jks</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution> <!-- 复制配置文件 -->
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>application.yml</include>
<include>application-*.yml</include>
</includes>
</resource>
</resources>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>