本地jar包可以放到resources/jar/下
使用mvn命令安装到本地maven库
mvn install:install-file "-Dfile=C:\Users\lskisme\3D Objects\MSunsoftProjects\jcjyhr\src\main\resources\jar\third-comm-1.0.jar" "-DgroupId=com.msun" "-DartifactId=thirdcomm" "-Dversion=1.0" "-Dpackaging=jar"
jar包右键添加进库,可以双击查看源码
pom文件正常引入但是不会打包进jar包
<dependency>
<groupId>com.msun</groupId>
<artifactId>thirdcomm</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/jar/third-comm-1.0.jar</systemPath>
</dependency>
//打包进jar包
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>