zoukankan      html  css  js  c++  java
  • maven nexus私服搭建

    1. 下载

    wget http://download.sonatype.com/nexus/oss/nexus-2.12.0-01-bundle.tar.gz

    2. 解压 

    tar zxvf nexus-2.12.0-01-bundle.tar.gz

    解压后两个目录

    nexus-2.12.0-01  //应用路径

    sonatype-work   //开发包存放路径

    3. 配置

    vim bin/nexus
    
    RUN_AS_USER=root
    
    vim conf/nexus.properties 
    application-port=8888   //启动端口
    nexus-work=/xxx/data/sonatype-work/nexus  //jar包存放路径
    

      

    4. 启动

    ./bin/nexus start
    

    5. 查看UI

    http://xxx.201.69.8:8888/nexus/
    

      login default: admin/admin123

    6. 配置nexus

      将type为proxy的Repository的Download Remote Indexes  设置为true.

      本地hosted仓库取不到即会向proxy远程仓库取。 

    7. IDE project配置

    // pom.xml
    <distributionManagement>
        <repository>
          <id>releases</id>
          <name>xxx Releases</name>
          <url>http://xxx.201.69.8:8888/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
          <id>snapshots</id>
          <name>xxx Snapshots</name>
          <url>http://xxx.201.69.8:8888/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    
    // setting.xml
        <server>
            <id>releases</id>
            <username>lqy_dev</username>
            <password>lqy123</password>
        </server>
        <server>
            <id>snapshots</id>
            <username>lqy_dev</username>
            <password>lqy123</password>
        </server>
    

      

     发布不能成功可能原因,setting文件配置不正确,查看实际使用的setting文件:

    mvn help:effective-settings
    

      

  • 相关阅读:
    python初体验-函数(1)
    python初体验-数值类型
    python初体验-常见错误类型
    动态规划专题——passage_1
    七夕——ORMAX(线段树)
    七夕——永远在一起(一维dp)
    动态规划4.4——背包问题
    动态规划4.3——最长公共子串问题
    动态规划4.2——子序列问题
    动态规划4.1——基础动态规划问题
  • 原文地址:https://www.cnblogs.com/kisf/p/7722511.html
Copyright © 2011-2022 走看看