zoukankan      html  css  js  c++  java
  • nexus Maven私服的相关配置

    Maven私服中如需本地上传Maven私服内容则需在  setting.xml中配置如下:

    <server>
      <id>nexus-releases</id>
      <username>admin</username>
      <password>q.123456</password>
    </server>
    <server>
      <id>nexus-snapshots</id>
      <username>admin</username>
      <password>q.123456</password>
    </server>

    在pom.xml中如需使用 Maven 私服代理下载 :

    <repositories>
        <repository>
            <id>nexus</id>
            <name>Nexus Repository</name>
            <url>http://192.168.27.137:8081/repository/maven-public/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>nexus</id>
            <name>Nexus Plugin Repository</name>
            <url>http://192.168.27.137:8081/repository/maven-public/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    如上  若需上传则应在pom.xml中配置如下,    注意: id 应一致

    <distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <name>Nexus Release Repository</name>
            <url>http://192.168.27.137:8081/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <name>Nexus Snapshot Repository</name>
            <url>http://192.168.27.137:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
  • 相关阅读:
    路由相关题目解析
    Centos7.6系统安装
    组播(二)---IGMP
    那些瞬间击中我的句子
    组播(一)
    记一次安装浪潮服务器的经历
    HP打印机驱动安装方法总结
    潍坊矿场ubuntu18 server 基本环境配置常用操作
    docker-zabbix
    MySQL 8.x 账号管理
  • 原文地址:https://www.cnblogs.com/A-FM/p/5224610.html
Copyright © 2011-2022 走看看