安装本地jar到仓库

在开发过程中出现一些自定义包或无法远程下载的jar包,可以通过手动安装的方式将jar包安装到本地仓库共项目使用

如:

复制代码
<dependency>
    <groupId>axis</groupId>
    <artifactId>axis-ant</artifactId>
    <version>1.4.RELEASE</version>
</dependency>

安装命令:

mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar

例如:

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\axis.jar -DgroupId=axis -DartifactId=axis -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\axis-ant.jar -DgroupId=axis -DartifactId=axis-ant -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\commons-discovery-0.2.jar -DgroupId=axis -DartifactId=commons-discovery -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\commons-logging-1.0.4.jar -DgroupId=axis -DartifactId=commons-logging -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\jaxrpc.jar -DgroupId=axis -DartifactId=jaxrpc -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\log4j-1.2.8.jar -DgroupId=axis -DartifactId=log4j -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\saaj.jar -DgroupId=axis -DartifactId=saaj -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\wsdl4j-1.5.1.jar -DgroupId=axis -DartifactId=wsdl4j -Dversion=1.4.RELEASE -Dpackaging=jar

仓库下生成对应的文件,如:

相关推荐
想进大厂的小徐17 小时前
maven的子模块和子pom的区别
java·maven
Samson Bruce18 小时前
【Maven Spring Nacos之profile】
maven
Skilce1 天前
ZrLog 高可用部署
运维·服务器·数据库·阿里云·maven
福运常在2 天前
股票数据API(21)如何获取股票指数最新分时交易数据
java·python·maven
Riu_Peter2 天前
【技术】Maven 配置 settings.xml 轮询下载
xml·java·maven
中国胖子风清扬3 天前
实战:基于 Camunda 8 的复杂审批流程实战指南
java·spring boot·后端·spring·spring cloud·ai·maven
zb200641203 天前
Spring Boot spring-boot-maven-plugin 参数配置详解
spring boot·后端·maven
圣光SG3 天前
Maven 学习笔记(基础入门版)
笔记·maven
deelless3 天前
IDEA maven项目添加本地jar包
maven·intellij-idea·jar
Dylan的码园3 天前
maven入门与核心功能介绍
java·maven