maven安装本地jar

不想你离开。 提交于 2019-11-27 12:52:03

一.修改setting.xml的配置为本地仓库地址

二.执行命令

mvn install:install-file "-Dfile=D:\Workspace-idea-SpringCloud\maven\my_local_repository\local\activemq-all-5.6.0.jar" "-DgroupId=activemq" "-DartifactId=activemq5.6.0" "-Dversion=5.6.0" "-Dpackaging=jar"

命令解释:

(1).-Dfile=待安装的jar

(2).-DgroupId, -DartifactId,  -Dversion:三个参数,就是指明了存放maven仓库(路径“D:\Workspace-idea-SpringCloud\maven\my_local_repository”下)中的位置;

(3).-Dpackaging :猜测就是指明文件类型

 

 

 

三.pom.xml

 

<dependency>    <groupId>activemq</groupId>    <artifactId>activemq5.6.0</artifactId>    <version>5.6.0</version></dependency>

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!