zoukankan      html  css  js  c++  java
  • 关于nexus的学习

    1.首先下载 解压版;

    2.将nexus的bin目录路径  写入  环境变量path中;

    3.修改 nexus配置文件wrapper.conf  15行  ,指定java.exe文件位置(例如:wrapper.java.command=F:workToolsjavajdk1.8.0_121injava);

    4.以管理员身份启动吗,命令行(cmd),如果不以管理员省份运行,可能会报错(wrapper  | OpenSCManager failed - 拒绝访问。 (0x5));

    5.输入命令  nexus    ,若 返回:Usage: nexus { console : start : stop : restart : install : uninstall }   ;则可继续;

    6.   安装:nexus install  ;

    7.   启动:nexus start    ;    

    学习博客:

    http://blog.csdn.net/fanyuna/article/details/40145827

    http://blog.csdn.net/fanyuna/article/details/40145827

    简单的走了一遍,综合平时工作中使用的部分,使用的setting.xml重点配置如下:

    <localRepository> F:project file.m2
    epository</localRepository>    //指定本地maven仓库
    
        <offline>true</offline>     //指定自动下载相关文件
    
    
    //设置  nexus账号(id和具体项目中的id一致,见下文)
        <server>
                <id>deploymentRepo1</id>
                <username>admin</username>
                <password>admin123</password>
        </server>
    
    //设置镜像文件(当本地仓库缺少jar包,会从这里下载)
        <mirror>
          <!--This sends everything else to /public -->
          <id>nexus2</id>
          <mirrorOf>*</mirrorOf> 
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
          <!-- <url>http://localhost:8081/nexus/content/groups/public/</url> -->
        </mirror>
    

      

    以下是具体项目中的设置:

        <distributionManagement>
            <repository>
                <id>deploymentRepo1</id>   //这个id需要和  上面的  server中的id一致,才有权限 部署项目到 nexus私库中.
                <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots/</url>
                <!--<url>http://localhost:8081/nexus/content/groups/public/</url>-->
            </repository>
        </distributionManagement>
    

      

    nexus一般为运维人员必备技能,但作为开发人员也需要了解及使用.

  • 相关阅读:
    JavaScript继承详解 转
    Chinese Consumer and Websites
    【转载】C#防SQL注入过滤危险字符信息
    记一次在数据库中查询:“包含”或者“仅包含”某些商品的订单的方法
    IE 6 position: relative + li 问题
    【转】c# 位操作
    基于asp.net MVC的无刷新文件上传
    C++ 类继承内存布局
    美杜杉 主动防御最新版
    [转]COM 连接点
  • 原文地址:https://www.cnblogs.com/zqsky/p/6828432.html
Copyright © 2011-2022 走看看