- pom引入外部依赖
<dependency>
<groupId>com.sys</groupId>
<artifactId>sys</artifactId>
<version>1.0.6</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/jarName.jar</systemPath>
</dependency>
- pom设置build
<build>
<finalName>jar包名</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
此时打包就大功告成啦!