SpringBoot项目引入jar包到本地
程序员文章站
2022-04-28 09:23:11
...
1.在resources下面创建lib文件夹,并将jar放置下面
2.打开pom文件,groupId、artifactId、version可以随便写,只要scope和systemPath写对即可;
在plugin标签中,加上
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
整体如下:
<dependency>
<groupId>com.aspose.diagram</groupId>
<artifactId>diagram</artifactId>
<version>20.4</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/aspose-diagram-20.4-jdk16.jar</systemPath>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.5.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
推荐阅读