nexus私服搭建及信息配置

下载

登录nexus官网下载nexus安装包https://help.sonatype.com/repomanager2/download/download-archives---repository-manager-oss

  • 我一开始在官网上没有成功的将安装包下载下来,所以使用的nexus的war包

启动服务

  • 使用war包形式,将nexus的war包放在tomcat webapps目录下,启动tomcat即可。



访问nexus服务

第一次访问时,是匿名用户登录,只能看到部分权限,需要切换到admin用户,默认密码是admin123

setting.xml文件配置

<servers>
<!-- 设置私库认证信息(访问) -->
<server>
<id>insuresmart-nexus</id>
<username>admin</username>
<password>admin123</password>
</server> <!-- 设置私库认证信息(发布) -->
<server>
<id>insuresmart-nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server> <server>
<id>insuresmart-nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers> <!--设置私库mirror 表示maven所有的请求都由nexus来处理 -->
<mirror>
<id>insuresmart-nexus</id>
<name>Yitong Nexus Repository</name>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8080/nexus/content/groups/public/</url>
</mirror> <!--设置maven私库信息 -->
<profile>
<id>insuresmart-nexus</id>
<repositories>
<repository>
<id>insuresmart-nexus</id>
<name>insuresmart nexus repository</name>
<url>http://localhost:8080/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>insuresmart-nexus</id>
<name>insuresmart nexus repository</name>
<url>http://localhost:8080/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile> <!--覆盖maven中央仓库设置开启releases和snapshots版本的下载-->
<profile>
<id>central</id>
<repositories>
<repository>
<id>central</id>
<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>
</profiles> <!--激活私库信息的配置 -->
<activeProfiles>
<activeProfile>insuresmart-nexus</activeProfile>
<activeProfile>central</activeProfile>
</activeProfiles>

pom.xml文件配置

 <!--当前项目发布到远程仓库中-->
<distributionManagement>
<repository>
<id>insuresmart-nexus-releases</id>
<name>insuresmart-nexus-releases</name>
<url>http://localhost:8080/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>insuresmart-nexus-snapshots</id>
<name>insuresmart-nexus-snapshots</name>
<url>http://localhost:8080/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

标签id的值必须与setting文件中server标签中的值一致。

	<server>
<id>insuresmart-nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server> <server>
<id>insuresmart-nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>

nexus私服搭建及信息配置的更多相关文章

  1. Window下Nexus私服搭建

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

  2. ava Maven项目之Nexus私服搭建和版本管理应用

    目录: Nexus介绍 环境.软件准备 Nexus服务搭建 Java Maven项目版本管理应用 FAQ 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓库的维 ...

  3. Java Maven项目之Nexus私服搭建和版本管理应用

    转载自:https://cloud.tencent.com/developer/article/1010603 1.Nexus介绍 Nexus是一个强大的Maven仓库管理器,它极大地简化了自己内部仓 ...

  4. Centos7.0下Nexus私服搭建

    1.下载nexus wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar. ...

  5. Maven使用教程二:nexus私服搭建及使用

    nexus安装 从nexus官网 下载最新的安装包 1.打开命令行,切换到nexus-3.2.1-01/bin目录下,回车.例:C:\Nexus\nexus-3.2.1-01\bin 2.输入:nex ...

  6. nexus私服搭建及maven生命周期

    一.maven找库流程 从流程上看创建nexus私服,能够优化流程,而且更加快速 二.nexus下载.安装 1.nexus下载地址 https://sonatype-download.global.s ...

  7. Nexus私服搭建

    maven私服的搭建 --> maven -->{ 1,本地仓库(从中央仓库下载保存到本地的或者自己到网上下载的jar文件包) 2,远程仓库 -->{ 1,中央仓库(maven官方j ...

  8. Nexus私服的安装与配置

    Nexus的安装与配置 仅以此文,献给陷入懒癌晚期的小伙伴们. 本文基于nexus 3.xx .0. What?Why?When?Who?Where? Sonatype Nexus是一款maven仓库 ...

  9. Nexus私服搭建使用及发布jar包到私服上供团队其他成员使用

    1.下载maven解压到指定目录,并配置环境变量 M2_HOME为maven解压目录 2.path中增加 %M2_HOME%\bin, 并确认 mvn -v 正确 3.下载nexus http://w ...

随机推荐

  1. C#自带的Version判断版本号的大小

    Version version1 = new Version("1.0.0.25"); Version version2 = new Version("1.0.0.24& ...

  2. MultiDesk远程桌面连接

    MultiDesk 是一个选项卡(TAB标签)方式的远程桌面连接 (Terminal Services Client),可以管理组远程桌面连接,更改连接端口. 功能特性 绿色软件,只有一个很小的可执行 ...

  3. 常见的SQL注入检测语句(转载)

    0x00 前言 现在很多WAF都能拦截sqlmap.havij 等注入工具的发包注入,所以这时我们需要在浏览器上使用hackerbar 进行手工注入,或者说是手工绕过注入攻击 0x01 发现SQL 注 ...

  4. 2019年Java面试题基础系列228道(4)

    1.Java 中能创建 volatile 数组吗? 能,Java 中可以创建 volatile 类型数组,不过只是一个指向数组的引用,而不是整个数组.我的意思是,如果改变引用指向的数组,将会受到 vo ...

  5. RBF神经网络学习算法及与多层感知器的比较

    对于RBF神经网络的原理已经在我的博文<机器学习之径向基神经网络(RBF NN)>中介绍过,这里不再重复.今天要介绍的是常用的RBF神经网络学习算法及RBF神经网络与多层感知器网络的对比. ...

  6. 任务调度之Quartz.Net配置文件

    前面介绍的任务的创建执行是通过代码来实现的,当要添加一个任务的时候就非常的不灵活,做不到热插拔.而通过配置文件的方式实现配置化,可以做到在添加一个任务的话,我们可以新建一个类库来定义Job做到热插拔. ...

  7. PHP中文名加密

    <?php function encryptName($name) { $encrypt_name = ''; //判断是否包含中文字符 if(preg_match("/[\x{4e0 ...

  8. Python 机器学习库 NumPy 教程

    0 Numpy简单介绍 Numpy是Python的一个科学计算的库,提供了矩阵运算的功能,其一般与Scipy.matplotlib一起使用.其实,list已经提供了类似于矩阵的表示形式,不过numpy ...

  9. 在做爬虫或者自动化测试时新打开一个新标签页,必须使用windows切换

    在做爬虫或者自动化测试时,有时会打开一个新的标签页或者新的窗口,直接使用xpath定位元素会发现找不到元素,在firefox中定位了元素还是找不到, 经过多次发现,在眼睛视野内看到这个窗口是在最前面, ...

  10. 二十一、RTC驱动

    一.RTC设备驱动分析 内核的rtc驱动位于内核drivers/rtc目录下,里面包含各个平台的RTC驱动.读者可在此目录下任意选择一个单板驱动文件进行分析,我选择的是rtc-davinci.c文件. ...