maven 如何引入本地jar包

我之前是用jenkins,构建java项目的时候,maven install 安装依赖的时候找不到

但是我们本地开发有这个依赖,先把开发的jar包上传到服务器上面,然后手动上传
maven引入本地jar包 - 图1

把这些依赖的jar包都上传一个目录下面,等下要指定目录

maven引入本地jar包 - 图2

  1. mvn install:install-file "-Dfile=/root/jar/包的名称" "-DgroupId=com.ibimfish" "-DartifactId=pond-sdk-open" "-Dversion=版本号" "-Dpackaging=jar"

修改完成的

maven引入本地jar包 - 图3

  1. mvn install:install-file "-Dfile=/root/jar/pond-sdk-open-1.15-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=pond-sdk-open" "-Dversion=1.15" "-Dpackaging=jar"
  2. mvn install:install-file "-Dfile=/root/jar/ibimfish-sso-0.0.1-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=ibimfish-sso" "-Dversion=0.0.1" "-Dpackaging=jar"
  3. mvn install:install-file "-Dfile=/root/jar/lane-api-1.0.2-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=lane-api" "-Dversion=1.0.2" "-Dpackaging=jar"
  4. mvn install:install-file "-Dfile=/root/jar/starter-kael-1.2-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=starter-kael" "-Dversion=1.2" "-Dpackaging=jar"
  5. mvn install:install-file "-Dfile=/root/jar/keeper-api-1.8-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=keeper-api" "-Dversion=1.8" "-Dpackaging=jar"
  6. mvn install:install-file "-Dfile=/root/jar/pond-sdk-1.15-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=pond-sdk" "-Dversion=1.15" "-Dpackaging=jar"
  7. mvn install:install-file "-Dfile=/root/jar/lane-sdk-1.0.2-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=lane-sdk" "-Dversion=1.0.2" "-Dpackaging=jar"
  8. mvn install:install-file "-Dfile=/root/jar/pond-api-1.15-SNAPSHOT.jar" "-DgroupId=com.ibimfish" "-DartifactId=pond-api" "-Dversion=1.15" "-Dpackaging=jar"
  9. mvn install:install-file "-Dfile=/root/jar/pond.jar" "-DgroupId=com.ibimfish" "-DartifactId=pond.jar" "-Dversion=1.15" "-Dpackaging=jar"
  10. mvn install:install-file "-Dfile=tinypinyin-2.0.3.jar" "-DgroupId=com.github.promeg" "-DartifactId=tinypinyin" "-Dversion=2.0.3" "-Dpackaging=jar"