maven打包記錄
包含本地jar包
全局只修改pom.xml即可
添加依賴
1、groupId隨便填
2、artifactId隨便填
3、version隨便填
4、scope填system
5、systemPath填jar包路徑,${project.basedir}爲當前項目路徑
<dependency>
<groupId>xxx</groupId>
<artifactId>aaa</artifactId>
<version>1.0.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/xxx/aaa.jar</systemPath>
</dependency>
添加插件
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.0.RELEASE</version>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
添加包含jar包
<resources>
<resource>
<directory>lib</directory>
<targetPath>/BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>