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. yii自定义行为组件(简介版)

    yii2 给框架底层预定义事件自定义处理程序. 1. common\config\main.php  修改配置文件添加   'as behaviors' => 'backend\behavior ...

  2. 为 vsftpd 启动 vsftpd:500 OOPS: SSL: cannot load RSA&nb

    博主在配置ftp服务器的时候 自己生成的CA,然后认证自己的私钥文件 一切配置都是没有问题的,然后重新启动服务器 service vsftpd restart    出现以下错误 为 vsftpd 启 ...

  3. python-4函数式编程

    1-高阶函数 变量可以指向函数.   def add(x, y, f): 例如f参数为函数 编写高阶函数,就是让函数的参数能够接收别的函数. Python内建了map()和reduce()高阶函数. ...

  4. Storm: 集群安装和配置

    前期准备:3台服务器: 192.168.8.94  192.168.8.95 192.168.8.96 去storm官网下载响应版本的软件包:http://storm.apache.org/downl ...

  5. Linux 安装github并配置ssh

    首先,你得有个github帐号. 1.用apt-get install git的方式安装git test@er:/$ sudo add-apt-repository ppa:git-core/ppa ...

  6. windows 定时任务 - 定时关机

    添加定时关机,刚好可以利用windows定时任务 [开始]->[控制面板]->[任务计划]->[添加任务计划] 1.找到 shutdown.exe 设置每天执行 2.设置晚上10点 ...

  7. 剑指Offer - 九度1214 - 丑数

    剑指Offer - 九度1214 - 丑数2013-11-21 21:06 题目描述: 把只包含因子2.3和5的数称作丑数(Ugly Number).例如6.8都是丑数,但14不是,因为它包含因子7. ...

  8. 架构师速成5.1-小学gtd进阶 分类: 架构师速成 2015-06-26 21:17 313人阅读 评论(0) 收藏

    人生没有理想,那和咸鱼有什么区别. 有了理想如何去实现,这就是gtd需要解决的问题.简单说一下gtd怎么做? 确定你的目标,如果不能确定长期目标,至少需要一个2年到3年的目标. 目标必须是可以衡量的, ...

  9. selenium定位弹出菜单

    写selenium脚本,在浏览器定位各种弹出菜单时,有时用工具很难去取菜单的属性,下面说下如何去取: 点开firebug ,切换到“脚本”界面,首先在输入框输入单字母s,待弹出下拉列表后,单击左侧的插 ...

  10. Kotlin的数据类:节省很多行代码(KAD 10)

    作者:Antonio Leiva 时间:Jan 25, 2017 原文链接:https://antonioleiva.com/data-classes-kotlin/ 在前面的文章中,我们已经见到了类 ...