方式一:通过mvn命令将包打到本地仓库
然后pom添加引用
方式二:直接在pom文件中添加引用
<dependency>
<groupId>com.zysj</groupId>
<artifactId>zwdd-sdk-java-1.1.9</artifactId>
<version>1.1.9</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/lib/zwdd-sdk-java-1.1.9-1.1.9.jar</systemPath>
</dependency>
在打包时需要额外增加 <includeSystemScope>true</includeSystemScope>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--<scope>system</scope> 时也打包进jar -->
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<!-- 跳过单元测试 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>