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上传

nexus搭建Maven私服之deploy(三)

上一篇:pip 换源以及上传库(pip换源2)


下一篇:手动上传SNAPSHOT文件到Maven私服Nexus的方法