nexus 私服搭建配置,并将自定义的jar发布到私服

本文详细介绍了如何在本地搭建nexus私服,包括下载、解压、配置端口、运行环境设置、安装与启动服务,以及如何登录、使用分组仓库和发布自定义jar到私服的操作步骤。
摘要由CSDN通过智能技术生成

一、前言

  为什么要在本地开发机器上安装nexus?首先声明公司内部是有自己的nexus仓库,但是对上传jar包做了限制,不能畅快的上传自己测试包依赖。于是就自己在本地搭建了一个nexus私服,即可以使用公司nexus私服仓库中的依赖,也可以上传和使用自己的测试包依赖。

二、nexus下载

  Download Nexus Repository OSS

  

三、解压

  将下载的nexus-3.14.0-04-win64.zip解压到自定义目录即可。

四、配置nexus的端口和上下文路径

打开zip解压文件下的 ../nexus-3.14.0-04-win64/nexus-3.14.0-04/etc/nexus-default.properties。
  如下属性可以自定义修改。

application-host : Nexus服务监听的主机
application-port: Nexus服务监听的端口,
nexus-context-path : Nexus服务的上下文路径
  通常可以不做任何修改,但个人习惯于修改 application-host 为127.0.0.1(关于0.0.0.0与127.0.0.1的区别自行检索),我这里只修改了端口。

五、运行环境配置


  打开解压目录下的 ../nexus-3.14.0-04-win64/nexus-3.14.0-04/bin/nexus.vmoptions

  可以在下图配置运行时的最大堆、最小堆等,可以根据个人的电脑以及需要修改,默认配置如下。

六、nexus安装


  在.../nexus-3.14.0-04-win64/nexus-3.14.0-04/bin 目录下,以管理员身份运行cmd 
  1. nexus.exe /run 命令可以启动nexus服务(参考官方文档) 
  2. 安装nexus本地服务来启动(推荐使用这种方式,参考官方文档),命令如下所示。

nexus.exe /install <optional-service-name>  //安装nexus服务
nexus.exe /install <optional-service-name>  //安装nexus服务


 七、启动/关闭nexus服务


nexus.exe /start <optional-service-name>   //启动nexus服务
nexus.exe /stop <optional-service-name>    //停止nexus服务


 八、登录


  默认的用户名和密码分别是:admin/amdin123

  如果没有做任何端口和上下文路径的修改,直接访问 http://localhost:8081即可。


十、分组仓库的使用

settings文件如下:

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

41摄氏度男

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值