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. AWS 身份及验证服务(四)

    IAM 概述 集中管理访问AWS资源的访问权限和用户身份认证 支持联合访问管理,支持LADP第三方服务 (Identity Provider) 是非区域相关的服务,全局有效 创建用户.组和角色以应用策 ...

  2. vue-cli3 + ts 定义全局方法

    一.定义全局方法不生效  虽然在main.ts当中定义了全局方法,但是在使用的时候根本找不到,也是无语了. 二.解决方法 我在网上找了很多方法,其中很多大神都是这样做的:  但是,我这样写了还是不生效 ...

  3. java设计模式(一)——单例模式

    1.基本介绍 单例设计模式,就是采取一定的方法保证在整个的软件系统中,对某个类只能存在一个对象实例,并且该类只提供-一个取得其对象实例的方法(静态方法).如:一般情况下,数据库的连接 2.创建方式: ...

  4. Appium移动自动化测试-----(十三)appium API 之其他操作

    其它操作针对移动设备上特有的一些操作. 1.熄屏 方法: * lockDevice() 点击电源键熄灭屏幕. 在iOS设备可以设置熄屏一段时间.Android上面不带参数,所以熄屏之后就不会再点亮屏幕 ...

  5. python开发【学习目录】:目录

    python开发[学习目录]:目录 Python开发:环境搭建(python3.PyCharm) Python开发[第一篇]:初识Python Python开发[第二篇]:Python基础知识 Pyt ...

  6. Echarts dataZoom 区域缩放

    dataZoom=[ //区域缩放 { id: 'dataZoomX', show:true, //是否显示 组件.如果设置为 false,不会显示,但是数据过滤的功能还存在. backgroundC ...

  7. ES-IK分词器

    一.安装 https://www.cnblogs.com/wudequn/p/11001382.html https://github.com/medcl/elasticsearch-analysis ...

  8. 图像处理库 Pillow与PIL

    PIL只支持python2的版本到2.7: Python imaging Library : Pillow 是PIL派生的一个分支,支持3以上Python版本. 命令使用pip安装: pip inst ...

  9. C++枚举类型教案

    一.枚举类型的应用场景 只需要将需要的变量值一一列举出来,便构成一个枚举类型. 二.枚举类型的定义 ·定义方式: enum 枚举类型名字{枚举常量表}: ·关键字enum:说明接下来定义的是一个枚举类 ...

  10. go 数据渲染到html页面 02

    渲染到浏览器页面 //把数据渲染到浏览器 package main import ( "fmt" "text/template" "net/http& ...