nexus使用教程

原文地址:https://blog.csdn.net/m18336132361/article/details/123580428

配置本地nexus仓库配置

<server>  
    <id>nexus</id>  
    <username>admin</username>  
    <password>root</password>  
</server>   

<mirrors>
    <mirror>  
        <id>nexus</id>  
        <name>nexus repository</name>  
        <url>http://localhost:10086/repository/myself_group/</url>  
        <mirrorOf>central</mirrorOf>  
    </mirror> 
</mirrors>

上传jar包到私有仓库

  1. 手动
mvn deploy:deploy-file -DgroupId=com.zmf -DartifactId=kingUtils -Dversion=2.0.0 -Dpackaging=jar -Dfile=./kingUtils-2.0.0-SNAPSHOT.jar -Durl=http://localhost:10086/repository/myself_hosted/ -DrepositoryId=nexus

上传地址来源(Browse菜单):

image.png
命令解释:
-DgroupId=com.zmf                           自定义
-DartifactId=kingUtils                         自定义
-Dversion=2.0.0                            自定义  三个自定义,构成pom.xml文件中的坐标
-Dpackaging=jar                             上传的类型是jar类型
-Dfile=./kingUtils-2.0.0-SNAPSHOT.jar                jar的本地磁盘位置
-Durl=http://localhost:10086/repository/myself_hosted/         hosted资源库的地址,下图中
-DrepositoryId=nexus                               setting.xml文件中配置的ID

  1. 使用网页上传
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容