Nexus私服的搭建
1.nexus 介绍
5.下载Maven仓库索引 手动下载
首先将索引下载到本地,下载地址:nexus-maven-repository-index.zip http://download.csdn.net/detail/pk490525/6520295
解压索引压缩包,将里面内容全部拷贝
关闭当前Nexus私服,打开Nexus目录%Nexus_Home%\sonatype-work\nexus\indexer\central-ctx,首先删除当前目录里所有内容,然后粘贴所下载的索引,最后启动Nexus私服,索引生效。
6.修改Maven配置文件从Nexus下载构件
- <!-- localRepository
- | The path to the local repository maven will use to store artifacts.
- |
- | Default: ~/.m2/repository
- <localRepository></localRepository>
- -->
- <repositories>
- <repository>
- <id>nexus</id>
- <name>my-nexus-repository</name>
- <url>http://127.0.0.1:8088/nexus-2.9.0/content/groups/public/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>nexus</id>
- <name>my-nexus-repository</name>
- <url>http://127.0.0.1:8088/nexus-2.9.0/content/groups/public/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- <profiles>
- <profile>
- <id>myprofile</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>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
3)配置镜像
maven部署
1) 修改pom文件
在pom文件中添加如下配置:

- <distributionManagement>
- <repository>
- <id>my-nexus-releases</id>
- <url>http://127.0.0.1:7788/nexus/content/repositories/releases/</url>
- </repository>
- <snapshotRepository>
- <id>my-nexus-snapshot</id>
- <url>http://127.0.0.1:7788/nexus/content/repositories/snapshots/</url>
- </snapshotRepository>
- </distributionManagement>

- <servers>
- <server>
- <id>my-nexus-releases</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- <server>
- <id>my-nexus-snapshot</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- </servers>
3)执行部署
测试的构件项目信息如下:

- <groupId>com.ez</groupId>
- <artifactId>TestJar</artifactId>
- <version>1.0</version>
- <packaging>jar</packaging>
- <name>TestJar</name>
从上面的信息中可以看出构件为发布版本,所以部署构件的话会自动部署至releases仓库中。
在命令行中执行:mvn clean deploy
如果之前没用执行过该命令,maven会自动到中央仓库中下载部署所需的插件。最后在命令行中看到如下所示就代表构件已经部署成功。
Nexus私服的搭建的更多相关文章
- maven nexus 私服的搭建学习
之前对maven有过初步的了解与认识,自己也创建过项目使用其来管理,但都是非常粗浅的操作,今天在高人的指点下,也学着在自己的电脑上搭建一个maven私服,虽然技术难度也不高,但为了更深层次的提高,这些 ...
- nexus私服linux搭建问题
一.最近搭建nexus私服,从官网下载下来总是报503服务器无效,很是无奈,最后在网上找到一个可以用的 收藏起来,这里给大家共享一下 下载地址:http://pan.baidu.com/s/1kT3U ...
- window下Nexus私服高级搭建
环境是:nexus-2.1.1.maven-3.0.4.jdk-1.6.0_32 一.用admin用户登陆nexus nexus的下载和安装都很简单 1.下载 http://www.sonatype. ...
- nexus私服的搭建和使用
- 【转】nexus Maven 环境搭建
http://www.cnblogs.com/quanyongan/archive/2013/04/24/3037589.html 为什么要搭建nexus私服,原因很简单,有些公司都不提供外网给项目组 ...
- Linux_Centos中搭建nexus私服
1.在Linux下搭建Nexus私服 1).下载并且解压 下载 nexus-2.11.2-03-bundle.zip unzip nexus-2.11.2-03-bundle.z ...
- Window下Nexus私服搭建
项目组大部分人员不能访问maven的central repository,因此在局域网里找一台有外网权限的机器,搭建nexus私服,然后开发人员连到这台私服上 环境是:nexus-2.1.1.mav ...
- Linux 安装配置maven3.0 以及搭建nexus私服
http://carvin.iteye.com/blog/785365 一.软件准备 1.apache-maven-3.0-bin.tar.gz 下载地址:http://www.apache.org/ ...
- 搭建nexus私服(maven)
这里提供nexus的直接下载页面的链接: https://www.sonatype.com/download-oss-sonatype maven获取依赖jar包是从中央仓库获取,但很莫名的出现jar ...
随机推荐
- 垃圾回收GC:.Net自己主动内存管理 上(二)内存算法
垃圾回收GC:.Net自己主动内存管理 上(二)内存算法 垃圾回收GC:.Net自己主动内存管理 上(一)内存分配 垃圾回收GC:.Net自己主动内存管理 上(二)内存算法 垃圾回收GC:.Net自己 ...
- HDU2037 事件排序问题
题目要求: Problem Description "今年暑假不AC?" "是的." "那你干什么呢?" "看世界杯呀,笨蛋!&q ...
- EJB是什么鸟东西?
到底EJB是什么 到底EJB是什么?被口口相传的神神秘秘的,百度一番,总觉得没有讲清楚的,仍觉得一头雾水.百度了很久,也从网络的文章的只言片语中,渐渐有了头绪. 用通俗话说,EJB就是:"把 ...
- curl强制下载文件
<?phpfunction download_remote_file_with_curl($file_url, $save_to) { $ch = curl_init(); curl_setop ...
- linux下安装rabbitmq以及在spring中进行集成
### 一.安装erlang 1. yum install ncurses-devel 2. ./configure --prefix=/usr/local/erlang20 --without-ja ...
- python 46 盒模型 与盒模型布局
一:盒模型 1. 盒模型的概念 广义盒模型:文档中所有功能性及内容性标签,及文档中显示性标签 侠义盒模型:文档中以块级形式存在的标签(块级标签拥有盒模型100%特性且最常用) 盒模型组成:margi ...
- go之结构体
一.关于结构体 简述 1.go 语言的切片可以存储同一类型的数据,但是结构体可以为不同项定义不同的数据类型 2.结构体是有一系列具有相同类型或不同类型的数据构成的数据集合 3.因为go 没有类似于类的 ...
- .Net Core添加分布式Session
一.Session HTTP是一个无状态协议,Web服务器将每一个请求都视为独立请求.并且不保存之前请求中用户的值. Session 状态是ASP.NET Core提供的一个功能,它可以在用户通应用访 ...
- JavaScript中赋值运算符的使用
JavaScript中的赋值运算可以分为简单赋值运算和复合赋值运算.简单赋值运算是将赋值运算符(=)右边表达式的值保存到左边的变量中:而复合赋值运算混合了其他操作(例如算术运算操作)和赋值操作.例如: ...
- 45.4.7 序列:USER_SEQUENCES(SEQ)
45.4.7 序列:USER_SEQUENCES(SEQ) 要显示序列的属性,可以查询USER_SEQUENCES 数据字典视图.该视图也能用公有同义词SEQ 进行查询.USER_SEQUENCES ...