nexus 3.17.0-01 windows安装及使用

1.解压后执行 nexus.exe /run 启动私服服务

2.打开 192.168.1.21:8081 进入私服管控台

2.1.在 sonatype-work\nexus3 下查看 admin.password 密码并 sign in 进行修改 (test password nexus)

3.在 Repository -> Repositories -> maven-central 下添加阿里仓库远程代理 https://maven.aliyun.com/nexus/content/groups/public/

4.maven settings.xml 配置
<mirrors>
    <!-- 阿里云仓库
    <mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>
     -->
    <!-- 中央仓库1
    <mirror>
        <id>repo1</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://repo1.maven.org/maven2/</url>
    </mirror>
    -->
    <!-- 中央仓库2
    <mirror>
        <id>repo2</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://repo2.maven.org/maven2/</url>
    </mirror>
     -->
    <mirror>
        <id>public</id>
        <mirrorOf>central</mirrorOf>
        <name>central repository</name>
        <url>http://192.168.1.21:8081/repository/maven-public/</url>
    </mirror>
</mirrors>

<profiles>
    <profile>
        <id>nexusProfile</id>
        <repositories>
            <repository>
                <id>nexus</id>
                <name>nexus</name>
                <url>http://192.168.1.21:8081/repository/maven-central/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
    </profile>
</profiles>

<activeProfiles>
    <activeProfile>nexusProfile</activeProfile>
</activeProfiles>

<servers>
    <server>
        <id>releases</id>
        <username>admin</username>
        <password>nexus</password>
    </server>

    <server>
        <id>snapshots</id>
        <username>admin</username>
        <password>nexus</password>
    </server>
</servers>

5.pom.xml 配置
<distributionManagement>
    <repository>
        <id>releases</id>
        <name>User Project RELEASES</name>
        <url>http://192.168.1.21:8081/repository/maven-releases/</url>
    </repository>

    <snapshotRepository>
        <id>snapshots</id>
        <name>User Project SNAPSHOTS</name>
        <url>http://192.168.1.21:8081/repository/maven-snapshots/</url>
    </snapshotRepository>
</distributionManagement>

6.deploy 模块

7.在 Browse -> maven-releases 中查看发布的模块

  

转载于:https://www.cnblogs.com/xiayudashan/p/11081812.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值