MAVEN手动安装jar到本地仓库

IT黑名单 2016-12-2 10:03:49

如果你:从远程仓库down jar比较慢,更换镜像还是很慢;

依赖的jar文件不多,而且你手头正好有这个jar文件。

那么你可以尝试手动安装jar到本地仓库。

maven命令:

mvn install:install-file -Dfile=e:/it-blacklist-0.0.1-SNAPSHOT.jar -DgroupId=cn.blacklist -DartifactId=it-blacklist -Dversion=0.0.1-SNAPSHOT
 -Dpackaging=jar
C:\Users\L440>mvn install:install-file -Dfile=e:/it-blacklist-0.0.1-SNAPSHOT.jar -DgroupId=cn.blacklist -DartifactId=it-blacklist -Dve
SHOT -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing e:\it-blacklist-0.0.1-SNAPSHOT.jar to e:\m2\repository\cn\blacklist\it-blacklist\0.0.1-SNAPSHOT\it-blacklist-0.0.1-S
[INFO] Installing C:\Users\L440\AppData\Local\Temp\mvninstall3345894050486064199.pom to e:\m2\repository\cn\blacklist\it-blacklist\0.0
lacklist-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.475 s
[INFO] Finished at: 2016-12-02T10:02:35+08:00
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------

转载请注明来源【IT黑名单

本文链接:http://blog.itblacklist.cn/20161202/8431.html

© Copyright 2016 IT黑名单 Inc.All Rights Reserved. 豫ICP备15018592号-2