1.以谷歌的gson.jar为例,先将该jar包下载到本地,然后再导入到本地maven仓库
2.在maven公共仓库下载gson-2.8.6.jar包,下载地址(后期可能会失效,可自行选在其它jar):https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar
3.将gson-2.8.6.jar修改成gson-2.8.6.test.jar,在IDEA 命令行执行命令,并导入到本地maven仓库:
mvn install:install-file -Dfile=D:gson-2.8.6.test.jar -DgroupId=com.google.code.gson -DartifactId=gson -Dversion=2.8.6.test -Dpackaging=jar
在POM文件的依赖
com.google.code.gsongson2.8.6.test
![84f448e63f76e8735d0ee8d279a77d58.png](https://img-blog.csdnimg.cn/img_convert/84f448e63f76e8735d0ee8d279a77d58.png)
连线部分与POM文件对应一致