随笔 - 240  文章 - 0  评论 - 8  阅读 - 13万

maven nexus 搭建私服(二)

nexus版本:nexus-3.37.3-02-win64,在2.x的nexus上面,不适用,不过原理一样,就配置不一样而已

1.配置setting.xml

2.上传jar包 (cmd命令)

3.上传jar包(pom文件,在idea使用mvn插件上传)

4.上传到自己创建的仓库

1.配置setting.xml

ps:名字取名:aa,后面上传命令用到

<server>
<id>aa</id>
<username>admin</username>
<password>admin</password>
</server>

2.上传jar包 (cmd命令)

 名字:aa,之前的命名

mvn deploy:deploy-file "-DgroupId=com.ligy" "-DartifactId=nexus2" "-Dversion=1.0-SNAPSHOT" "-Dpackaging=jar" "-Dfile=D:\IdeaProjects\nexus2\target\nexus2-1.0-SNAPSHOT.jar" "-Durl=http://localhost:8081/repository/maven-snapshots/" "-DrepositoryId=aa"

 

 

 

 

 

 

3.上传jar包(pom文件,在idea使用mvn插件上传)

这里把版本号,改为:2.0-SNAPSHOT

复制代码
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.ligy</groupId>
    <artifactId>nexus2</artifactId>
    <version>2.0-SNAPSHOT</version>

    <distributionManagement>
        <snapshotRepository>
            <id>aa</id>
            <name>aaaaaa</name>
            <url>http://localhost:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
</project>
复制代码

 

 

 

 

 4.上传到自己创建的仓库

先创建自己的仓库:demo1-ligy

 

 

 

 

 

posted on   biind  阅读(94)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术
历史上的今天:
2021-01-12 vue 入门
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示