博客
关于我
maven私服的配置使用
阅读量:434 次
发布时间:2019-03-06

本文共 1742 字,大约阅读时间需要 5 分钟。

搭建私服Nexus

1. 下载Nexus

下载地址:(文中已去除具体下载链接)

可以选择下载zip和tar包,分别对应Windows和Linux系统。

2. 安装Nexus

下载完成后,解压zip包,进入bin目录,运行命令:

nexus.bat install

3. 卸载Nexus

执行命令:

nexus.bat uninstall

4. 启动Nexus

  • 打开命令提示符,进入Nexus安装目录,执行命令:
  • nexus.bat start
    1. 在服务中找到Nexus,右键选择“启动”。
    2. 5. Nexus配置文件详解

      Nexus的配置文件位于conf/nexus.properties,主要配置项包括:

      • application-port=8081:Nexus的访问端口,默认不需要修改。
      • application-host=0.0.0.0:Nexus的主机监听设置,默认保留。
      • nexus-webapp=${bundleBasedir}/nexus:Nexus的工程目录。
      • nexus-webapp-context-path=/nexus:Nexus的Web访问路径。
      • nexus-work=${bundleBasedir}/../sonatype-work/nexus:Nexus的仓库目录。
      • runtime=${bundleBasedir}/nexus/WEB-INF:Nexus运行程序目录。

      6. 访问私服

    3. 打开浏览器,访问http://localhost:8081/nexus
    4. 点击右上角的“登录”,输入默认用户名admin,密码admin123
    5. 7. 上传jar包到私服

      在Maven的setting.xml中配置私服仓库:

      releases
      admin
      admin123
      snapshots
      admin
      admin123

      在项目的pom.xml中添加仓库配置:

      releases
      http://localhost:8081/nexus/content/repositories/releases/
      snapshots
      http://localhost:8081/nexus/content/repositories/snapshots/

      运行mvn deploy命令即可将项目发布到私服仓库,依据项目版本是否以“snapshot”结尾,决定发布至快照仓库或发布仓库。

      8. 从私服下载jar包

      在Maven的setting.xml中添加私服仓库配置:

      dev
      nexus
      http://localhost:8081/nexus/content/groups/public/
      true
      true
      public
      http://localhost:8081/nexus/content/groups/public/

      激活“dev”配置:

      dev

    转载地址:http://zeuyz.baihongyu.com/

    你可能感兴趣的文章
    parallels desktop for mac安装虚拟机 之parallelsdesktop密钥 以及 parallels desktop安装win10的办公推荐可以提高办公效率...
    查看>>
    parallelStream导致LinkedList遍历时空指针的问题
    查看>>
    Parameter ‘password‘ not found. Available parameters are [md5String, param1, username, param2]
    查看>>
    ParameterizedThreadStart task
    查看>>
    Paramiko exec_命令的实时输出
    查看>>
    Spring security之管理session
    查看>>
    paramiko模块
    查看>>
    param[:]=param-lr*param.grad/batch_size的理解
    查看>>
    spring mvc excludePathPatterns失效 如何解决spring拦截器失效 excludePathPatterns忽略失效 拦截器失效 spring免验证拦截器不起作用
    查看>>
    Spring Cloud 之注册中心 EurekaServerAutoConfiguration源码分析
    查看>>
    Parrot OS 6.2 重磅发布!推出全新 Docker 容器启动器
    查看>>
    Parrot OS 6.3 发布!全面提升安全性,新增先进工具,带来更高性能
    查看>>
    ParseChat应用源码ios版
    查看>>
    Part 2异常和错误
    查看>>
    Pascal Script
    查看>>
    Spring Boot集成Redis实现keyspace监听 | Spring Cloud 34
    查看>>
    Spring Boot中的自定义事件详解与实战
    查看>>
    Passport 密码模式
    查看>>
    Spring Boot(七十六):集成Redisson实现布隆过滤器(Bloom Filter)
    查看>>
    passport 简易搭配
    查看>>