pom文件scope的system属性方式
1.在项目根路径中新建lib文件夹,将所需jar包放入lib文件夹
2.在pom中引入
<dependency>
<groupId>com</groupId>
<artifactId>ssss</artifactId>
<version>2.8</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/ssss-1.1.jar</systemPath>
</dependency>
注意:
- groupId:自定义
- artifactId:自定义
- version:自定义
- scope:必须是system
- systemPath:jar包的路径(idea编写的时候会有提示的)
3.打包的时候需要需要通过resource标签引入
<build>
<resources>
<resource>
<directory>lib</directory>
<targetPath>/BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>
</build>