阿拉蕾ff

Maven 引用本地 jar 到 pom.xml

  • 拷贝leixin-1.1.jar到D:/MyWork/Maven/,执行cmd操作:
D:\MyWork\Maven>mvn install:install-file -Dfile=d:/mywork/maven/leixin-1.1.jar -DgroupId=com.leixinwork -DartifactId=leixin -Dversion=1.1 -Dpackaging=jar -DgeneratePom=true
 
[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 d:\mywork\maven\leixin-1.1.jar to D:\MyWork\Maven\RepMaven\com\leixinwork\leixin\1.1\leixin-1.1.jar
[INFO] Installing C:\Users\ADMINI~1\AppData\Local\Temp\mvninstall1620939548586709374.pom to D:\MyWork\Maven\RepMaven\com\leixinwork\leixin\1.1\leixin-1.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.879 s
[INFO] Finished at: 2017-03-05T00:49:56+08:00
[INFO] Final Memory: 6M/114M
[INFO] ------------------------------------------------------------------------
  • 查看Maven仓库 ,路径/com/leixinwork/leixin/1.1/下:
- leixin-1.1.jar
- leixin-1.1.pom

posted on 2017-03-05 09:22  博客中心  阅读(951)  评论(0编辑  收藏  举报

导航