一.修改setting.xml的配置为本地仓库地址maven
二.执行命令ide
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"idea
命令解释:spa
(1).-Dfile=待安装的jarxml
(2).-DgroupId, -DartifactId, -Dversion:三个参数,就是指明了存放maven仓库(路径“D:\Workspace-idea-SpringCloud\maven\my_local_repository”下)中的位置;blog
(3).-Dpackaging :猜想就是指明文件类型it
三.pom.xmlio
<dependency> <groupId>activemq</groupId> <artifactId>activemq5.6.0</artifactId> <version>5.6.0</version></dependency>