安装本地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

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

相关推荐
2601_953824615 天前
基于SSM的水果超市管理系统
java·tomcat·maven
明月_清风5 天前
Maven 到底是什么?一篇文章搞懂 Java 项目构建与依赖管理
java·后端·maven
今年下半年6 天前
SpringBoot整合金蝶中间件
spring boot·中间件·maven
vx_BS813307 天前
【项目编号:project51629】Spring Boot 乡村自来水缴费系统:把抄表、水费生成与在线缴费做成一条数字化闭环
java·spring boot·eclipse·tomcat·maven
暮雨哀尘8 天前
JAVA基础练习(四):SpringBoot 实现简易登录功能
java·spring boot·eclipse·maven
hanchenxing8 天前
CI/CD流水线中的构建缓存:从原理到最小可运行示例CI/CD
maven·构建缓存
愛芳芳9 天前
Swagger2 多环境动态配置实战指南
java·后端·maven·springboot·swagger
金玉满堂@bj10 天前
多环境部署方案(开发、测试、生产,搭配Tomcat\+WAR包)
java·tomcat·maven
青春易逝丶10 天前
Maven
java·maven