使用jar文件手动安装到Maven仓库

不知道最近怎么回事,Docker镜像下载不下来,Maven依赖也下载不下来,手动下载一个jar文件安装到仓库。

mvn install:install-file -Dfile=jar包的路径 -DgroupId=gruopId中的内容 -DartifactId=actifactId的内容 -Dversion=version的内容 -Dpackaging=jar

如:

➜  ~ mvn install:install-file -Dfile=/Users/admin/Downloads/mybatis-plus-generator-3.3.2.jar -DgroupId=com.baomidou -DartifactId=mybatis-plus-generator -Dversion=3.3.2 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing /Users/admin/Downloads/mybatis-plus-generator-3.3.2.jar to /Users/admin/.m2/repository/com/baomidou/mybatis-plus-generator/3.3.2/mybatis-plus-generator-3.3.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.169 s
[INFO] Finished at: 2022-11-02T21:07:44+08:00
[INFO] ------------------------------------------------------------------------
This entry was posted in 默认分类 and tagged . Bookmark the permalink.