调整pom打包方式
This commit is contained in:
parent
f05dcadea4
commit
4e1e9f4ded
44
pom.xml
44
pom.xml
@ -199,9 +199,17 @@
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!-- 打包时去除第三方依赖 -->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<layout>ZIP</layout>
|
||||
<includes>
|
||||
<include>
|
||||
<groupId>non-exists</groupId>
|
||||
<artifactId>non-exists</artifactId>
|
||||
</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
@ -210,6 +218,42 @@
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 拷贝第三方依赖文件到指定目录 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- target/lib 是依赖jar包的输出目录,根据自己喜好配置 -->
|
||||
<outputDirectory>target/lib</outputDirectory>
|
||||
<excludeTransitive>false</excludeTransitive>
|
||||
<stripVersion>false</stripVersion>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 排除静态资源,静态资源自行拷贝 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/*.properties</exclude>
|
||||
<exclude>**/*.xml</exclude>
|
||||
<exclude>**/*.yml</exclude>
|
||||
<exclude>static/**</exclude>
|
||||
<exclude>templates/**</exclude>
|
||||
<exclude>mybatis/**</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user