https://www.jianshu.com/p/7a09915675d9

或许用得上。

settings.xml

<server>      <!-- 服务器密码 -->
     <id>user-release</id>
     <username>admin</username>
     <password>admin123</password>
   </server>
   <server>
     <id>user-snapshots</id>
     <username>admin</username>
     <password>admin123</password>
   </server>
</servers>

<!-- 配置私服地址映射 -->
<mirror>
       <id>nexus</id>
       <mirrorOf>*</mirrorOf>
       <name>MyRepository</name>
       <!--私服仓库地址-->
       <url>http://localhost:8081/nexus/content/groups/public</url>
</mirror>

<profile>
        <id>nexus</id>
        <repositories>
            <repository>
                <id>central</id>
                <name>MyRepository</name>
                <url>http://central</url>
                <releases>
                     <enabled>true</enabled>
                </releases>
                <snapshots>
                     <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>central</id>
                <url>http://central</url>
                <releases>
                     <enabled>true</enabled>
                </releases>
                <snapshots>
                     <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>

  <!-- 激活私服映射 -->
  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>

pom.xml

<!-- 镜像加速 -->
<repositories>
    <repository>
        <id>nexus</id>
        <name>nexus</name>
            <url>http://localhost:8081/nexus/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
</repositories>

<!-- 镜像发布 -->
<distributionManagement>
      <repository>
        <!-- 两个ID必须与 setting.xml中的<server><id>nexus-releases</id></server>保持一致-->
          <id>user-release</id>
          <name>User Project Release</name>
          <url>http://localhost:8081/nexus/content/repositories/releases/</url>
        </repository>  

     <snapshotRepository>
        <id>user-snapshots</id>
         <name>User Project SNAPSHOTS</name>
         <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
       </snapshotRepository>
</distributionManagement>  

nexus私服常用设置的更多相关文章

  1. Linux 安装配置maven3.0 以及搭建nexus私服

    http://carvin.iteye.com/blog/785365 一.软件准备 1.apache-maven-3.0-bin.tar.gz 下载地址:http://www.apache.org/ ...

  2. Linux 搭建 nexus 私服【转】

    原文:https://yq.aliyun.com/articles/5981 第8章 私服nexus 本章详细介绍了nexus的安装过程,设置maven从私服下载构件,以及发布构件至nexus. 8. ...

  3. Maven项目的打包发布到Nexus私服和服务器

    1.编写pom文件如下: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins< ...

  4. 使用mvn命令将pom和jar上传至nexus私服

    要将自定义的jar或者pom上传至nexus私服,需要配置maven的settings文件! 上传至nexus私服配置 1. settings配置 <!-- maven设置私服对应的信息:id. ...

  5. nexus私服update repair index索引失败解决方案(转)

    转载地址:http://blog.csdn.net/first_sight/article/details/51559086 问题描述: 搭建Maven的Nexus私服仓库,一般安装完Nexus后,默 ...

  6. linux 搭建 nexus 私服及配置

    安装篇 1.tar -zxvf nexus-latest-bundle.tar.gz 2.cd nexus-2.13.0-01/bin 3../nexus start 这时可能提示 ********* ...

  7. Linux下建立Nexus私服

    Linux下建立Nexus私服 要安装3个东西,然后配置私服: 1.JDK 2.Maven 3.Nexus 然后配置 1.JDK的安装 下载JDK安装包,格式为RPM格式,安装即可 安装程序 #rpm ...

  8. Linux_Centos中搭建nexus私服

    1.在Linux下搭建Nexus私服 1).下载并且解压      下载  nexus-2.11.2-03-bundle.zip      unzip nexus-2.11.2-03-bundle.z ...

  9. Window下Nexus私服搭建

    项目组大部分人员不能访问maven的central repository,因此在局域网里找一台有外网权限的机器,搭建nexus私服,然后开发人员连到这台私服上  环境是:nexus-2.1.1.mav ...

随机推荐

  1. Study 8 —— 行块元素及定位

    行&块元素display:inline;display:block;display:inline-block; 盒模型padding[内边距]padding: 上下内边距 左右内边距;padd ...

  2. CentOS6.8下查看yum及rpm安装后的软件位置

    参考资料:http://blog.csdn.net/ngvjai/article/details/7997743   http://blog.sina.com.cn/s/blog_976e495701 ...

  3. UVA - 12487 Midnight Cowboy(LCA+思维)

    https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  4. 四、NAND Flash

    4.1 nand flash启动u-boot nand flash 启动的时候,CPU 需要将 nand flash 中前面 4KB 的内容复制到 SRAM 中执行,然后将 NAND Flash 中的 ...

  5. u-boot移植(九)---代码修改---NAND

    一.NAND原理 NAND 无地址空间,地址和数据的发送都依赖于LDATA[0:7]这一串数据总线. 不看随机页编程,看到从高位到低位的页,总共分为64个页面,每个页的组成是2K + 64  个byt ...

  6. [CERC2016]机棚障碍 Hangar Hurdles(kruskal重构树+树上倍增)

    题面 \(solution:\) 某蒟蒻的心路历程: 这一题第一眼感觉很奇怪 带障碍物的图,最大的集装箱? 首先想到的就是限制我集装箱大小条件的是什么: 如果我要在某一个点上放一个集装箱且使它最大, ...

  7. P3806 【模板】点分治1(CDQ分治)

    题目链接:https://www.luogu.org/problemnew/show/P3806 题目大意:中文题目 具体思路:直接dfs好像会超时,然后我们就开始想优化的方法,然后就是一个CDQ入门 ...

  8. django学习~第四篇

    django表单   1  今天继续来学学django的表单       首先介绍下http的方法,这是最基本的       GET 方法 GET一般用于获取/查询 资源信息,以?分割URL和传输数据 ...

  9. Java的三种代理模式:静态代理/JDK动态代理/Cglib动态代理

    1.静态代理:需要定义接口或者父类,目标对象与代理对象均实现同一接口或继承同一父类. 2.JDK动态代理:需要目标对象实现一个接口,通过动态反射的机制,生成代理对象,实现同一个接口 3.Cglib动态 ...

  10. Spring+Struts+Mybatis+Shiro整合配置

    Jar包