1.找到maven的安装路径,例如:C:\apache-maven-3.3.9

打开conf目录下的settings.xml文件

2.在<servers>节点下,配置
<server>
<id>nexus</id>
<username>用户名</username>
<password>密码</password>
</server> 3.在<profiles>节点下配置
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus</name>
<url>http://http://nexus_ip:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus</name>
<url>http://http://nexus_ip:8081/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile> 4.在<settings>节点下配置
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>

把自己开发的jar包上传到Nexus服务器,在maven中即可引用

例如:

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.8</version>
</dependency>

  

maven使用nexus服务器的更多相关文章

  1. Maven仓库管理-Nexus

    Maven仓库管理-Nexus @import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style& ...

  2. Centos 基础开发环境搭建之Maven私服nexus

    hmaster 安装nexus及启动方式 /usr/local/nexus-2.6.3-01/bin ./nexus status Centos 基础开发环境搭建之Maven私服nexus . 软件  ...

  3. Maven仓库搭建--nexus私服

    Maven仓库搭建--nexus私服(Linux环境) Maven仓库简介 Maven仓库分为本地仓库.远程仓库.私服.本文重点介绍私服的使用方法. 下载安装包 网址:http://www.sonat ...

  4. Ubuntu server下搭建Maven私服Nexus

    Ubuntu server下搭建Maven私服Nexus Maven私服Nexus的作用,主要是为了节省资源,在内部作为maven开发资源共享服务器来使用. 1.下载 通过root用户进去Ubuntu ...

  5. Maven仓库Nexus的安装配置

    1.下载nexus,最新版本是nexus-2.8.0-05   参考文章 下载nexus-latest-bundle.zip文件后,并解压到  D:\nexus下 配置nexus的环境变量:先配置NE ...

  6. [转]Maven与nexus关系

    开始在使用Maven时,总是会听到nexus这个词,一会儿maven,一会儿nexus,当时很是困惑,nexus是什么呢,为什么它总是和maven一起被提到呢? 我们一步一步来了解吧. 一.了解Mav ...

  7. [转]Maven与nexus

    开始在使用Maven时,总是会听到nexus这个词,一会儿maven,一会儿nexus,当时很是困惑,nexus是什么呢,为什么它总是和maven一起被提到呢? 我们一步一步来了解吧. 一.了解Mav ...

  8. 持续集成之三:搭建Maven私服Nexus

    安装环境 Red Hat Enterprise Linux Server release 7.3 (Maipo) jdk1.7.0_80 apache-tomcat-7.0.90 mysql-5.7. ...

  9. Maven 使用 Nexus 内部库 代理

    反正任由总理怎么强调,在中国的当前的网络环境下,中央库的访问速度总是令人心碎.建一个nexus内部库可以建立缓存,只要有人通过它下载了相关的maven依赖,那么别人需要时可以马上从本地网络的服务器上返 ...

随机推荐

  1. sqlite的sql常用语句(笔记)

    1.复制一张表并重命名 比如已经创建好一个表 表名为"28165" 复制这个表. CREATE TABLE [33150] AS SELECT * FROM [28165] 2.根 ...

  2. 将 cmd 中命令输出内容保存为 TXT 文本文件

    如果执行的命令输出内容较多,那么 cmd 控制台将会自动清除前面的内容,那么如何将屏幕的所有内容导出到文本文件? 下面给出简单的演示例子 ping百度,不会自动结束,按 Ctrl+C 强制结束,pin ...

  3. 汇编:输出寄存器AX中的内容(子程序)

    ;输出寄存器AX中的内容(子程序) DATAS segment DATAS ends CODES segment START: mov AX,DATAS mov DS,AX ;正式代码开始 mov A ...

  4. Laravel系列 Web

    一.Homestead准备 上一篇文章已经对它的配置进行了说明,下面对Homestead.yaml进行说明 --- ip: "192.168.10.10" memory: 2048 ...

  5. Error: Cannot find module 'core-js/fn/array/values' at Function.Module._resolveFilename (module

    E:\codeBase\top605\rescue-master\server\node_modules\_log4js@1.1.1@log4js\lib\log4js.js:321 throw ne ...

  6. js过滤和包含数组方法

    let data=[{'Linda':'apple'},{'Linda':'pear'},{'Linda':'apricot'},{'Linda':'peach'},{'Linda':'grape'} ...

  7. linux命令随身记

    赋予权限命令:chmod 755 * 查询进程: ps -ef |grep abc 查看含有"abc"的活动进程 ps -ef |grep -v abc 查看不含abc的活动进程 ...

  8. android stadio open recent 在同一窗口打开

    Android staido 有一个功能是open recent ,默认是下面这样的: 就出来一个框,给你选择,是在新的窗口打开,还是在当前窗口打开.如果你选了当前窗口,并且点了Remember,do ...

  9. Windows下zookeeper注册中心的安装和启动

    zookeeper的安装支持单机模式和集群模式 下载地址:http://www.apache.org/dyn/closer.cgi/zookeeper/,当前稳定版本为3.4.8 单机模式 修改zoo ...

  10. Ubuntu系列问题

    一.Ubuntu16.04 intel_rapl : no valid rapl domains found in packge0 echo 'blacklist intel_rapl' >&g ...