nexus3添加jar包

一、使用最高权限登录nexus

输入默认账号:admin 密码:admin123

这里写图片描述

二、创建第三方私有maven仓库

选择导航栏的齿轮,点击左侧菜单 Repositories,点击Create repository

这里写图片描述

选择 maven2 hosted

这里写图片描述

Name 输入 3rdParty ,Hosted选择Allow redeploy,点击 Create repository

这里写图片描述

查看到 3rdParty ,创建成功!~

这里写图片描述

三、修改maven 插件

修改/conf/settings.xml文件

这里写图片描述

找到servers标签 增加

    <server><!-- nexus3 -->
        <id>3rdParty</id>
        <username>admin</username>
        <password>admin123</password>
    </server>

这里写图片描述

四、jar包上传nexus

打开cmd控制台,输入如下:

mvn deploy:deploy-file -DgroupId=com.baidu.ueditor -DartifactId=ueditor -Dversion=1.1.2 -Dpackaging=jar -Dfile=D:\ueditor-1.1.2.jar -Durl=http://localhost:8081/repository/3rdParty/ -DrepositoryId=3rdParty

这里写图片描述

这里写图片描述

成功!~

这里写图片描述

对控制台输入内容的解析

        <dependency>
            <groupId>com.baidu.ueditor</groupId>
            <artifactId>ueditor</artifactId>
            <version>1.1.2</version>
        </dependency>
mvn deploy:deploy-file -DgroupId=com.baidu.ueditor -DartifactId=ueditor -Dversion=1.1.2 -Dpackaging=jar -Dfile=D:\ueditor-1.1.2.jar -Durl=http://localhost:8081/repository/3rdParty/ -DrepositoryId=3rdParty

DgroupId: 对应pom.xml中 <groupId>
DartifactId: 对应pom.xml中 <artifactId>
Dversion: 对应pom.xml中 <version>
Dpackaging: 包的类型
Dfile: 包所在路径
Durl: nexus的3rdParty路径(可以在nexus中找到3rdParty私有仓库,在url列点击copy按钮)
DrepositoryId: 选择仓库

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值