其他分享
首页 > 其他分享> > nexus搭建Maven私服之deploy(三)

nexus搭建Maven私服之deploy(三)

作者:互联网

配置Setting.xml

 <servers>
        <server>
            <id>nexus-releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>nexus-snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>

配置项目POM;发布

<!-- 定义snapshots库和releases库的nexus地址 -->
<distributionManagement>
    <repository>
        <!-- 库的id -->
        <id>nexus-releases</id>
        <!-- 库的url -->
        <url>https://172.15.123.19:9298/nexus/maven/repositories/releases/</url>
    </repository>
    <snapshotRepository>
        <id>nexus-snapshots</id>
        <url>https://172.15.123.19:9298/nexus/maven/repositories/snapshots/</url>
    </snapshotRepository>
</distributionManagement>
mvn deploy -Dmaven.test.skip=true

命令行直接发布

mvn deploy:deploy-file -DgroupId=com.xy.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.4.0 -Dpackaging=jar -Dfile=E:\ojdbc14.jar -Durl=https://172.15.123.19:9298/nexus/maven/repositories/snapshots/ -DrepositoryId=thirdparty

nexus上传

标签:releases,deploy,nexus,私服,snapshots,Maven,172.15,https
来源: https://www.cnblogs.com/pengsn/p/13624845.html