Maven将Jar安装到本地仓库和Jar上传到私服

本文介绍了如何使用Maven命令将Jar包安装到本地仓库以及上传到私服。具体操作包括:1. 使用`mvn install:install-file`命令,指定DgroupId, DartifactId, Dversion, Dpackaging和Dfile参数来安装Jar。2. 使用`mvn deploy:deploy-file`命令,除相同参数外,还需提供Durl(私服仓库URL)和DrepositoryId(服务器ID)来部署到私服。" 80137279,7329814,密码技术详解:对称加密、非对称加密与数字签名,"['密码学', '加密算法', '信息安全', '数据保护']
摘要由CSDN通过智能技术生成

Jar的maven配置

<dependency> 

        <groupId>pentaho-kettle</groupId> 
        <artifactId>kettle-core</artifactId> 
        <version>5.0.1-stable</version>  

 </dependency>

1. 将Jar包安装到本地仓库

命令:

 

[html] view plain copy

  1. mvn install:install-file-Dfile=C:\Users\pcdalao\Desktop\Kettle\kettle-core-5.0.1-stable.jar-DgroupId=pentaho-kettle-DartifactId=kettle-core-Dversion=5.0.1-stable-Dpackaging=jar   

 

-- DgroupId和DartifactId构成了该jar包在pom.xml的坐标, 对应依赖的DgroupId和DartifactId
-- Dfile表示需要上传的jar包的绝对路径

 

-- Dversion 为安装文件的版本信息

 

-- Dpackaging 为安装文件的种类

 

2. 上传Jar到私服  

命令:

[html] view plain copy

  1. mvn deploy:deploy-file-DgroupId=pentaho-kettle-DartifactId=kettle-core-Dversion=5.0.1-stable-Dpackaging=jar-Dfile=C:\Users\pcdalao\Desktop\Kettle\kettle-core-5.0.1-stable.jar-Durl=http://localhost:8081/nexus/content/repositories/thirdparty-DrepositoryId=thirdparty 

 


-- DgroupId和DartifactId构成了该jar包在pom.xml的坐标, 对应依赖的DgroupId和DartifactId
-- Dfile表示需要上传的jar包的绝对路径
-- Durl私服上仓库的url精确地址(打开nexus左侧repositories菜单,可以看到该路径)
-- DrepositoryId服务器的表示id,在nexus的configuration可以看到

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值