Mac/windows 下 手动将jar包打包到maven本地仓库

安装好maven:https://blog.csdn.net/sinat_37812248/article/details/84624763

终端输入: mvn install:install-file -Dfile=xx.jar -DgroupId=xx -DartifactId=xx -Dversion=xx -Dpackaging=jar

 

 

 

 

-Dfile: jar的所在路径+jar包名+.jar(不知道路径怎么看可将文件直接拖入终端便会显示路径)

   -DgroupId: 对应maven的groupId

   -DartifactId: 对应maven的artifactId

   -Dverson: 对应maven的version

pom.xml中引入依赖:

   <dependency>

      <groupId>x x</groupId>

      <artifactId>x x</artifactId>

      <version>x x</version>

   </dependency>