maven引用本地jar包并打包

1、resources下建目录lib,lib下放jar包

 2、pom文件加依赖

  <dependency>
    <groupId>包名</groupId>
    <artifactId>k3cloud-webapi-sdk</artifactId>
    <version>8.0.4</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/src/main/resources/lib/包名</systemPath>
  </dependency>

3、加插件

  <plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
    <includeSystemScope>true</includeSystemScope>
    </configuration>
  </plugin>

4、打包

 

 



posted @ 2023-03-13 16:48  天冷吃冰棍儿  阅读(467)  评论(0编辑  收藏  举报