Maven+Nexus私服搭建
来源:互联网 发布:jre 8u45 windows x64 编辑:程序博客网 时间:2024/05/04 06:13
一、下载 直接通过官方下载最新的开源版,里面也有详细的安装教程。
官方下载地址:http://www.sonatype.org/nexus/go
二、安装 安装过程很简单,只需要把文件拷贝到某路径下即可。
$ sudo mkdir -p /opt/nexus // 创建/opt/nexus/目录$ sudo chmod 777 /opt/nexus // 给/opt/nexus/目录可读可写可执行权限$ tar xvzf nexus-2.x.x-bundle.tgz // 解压缩$ cp -r nexus-2.x.x /opt/nexus/ // 拷贝到/opt/nexus/目录下
三、完成 安装完成就可以启动来验证是否安装成功,如果提示:Failed to start Nexus OSS.就有可能是权限问题。
四、配置 进行简单的配置实现官方仓库本地映射。
基本配置 主要实现本地创建代理远程仓库。
1、打开WEB管理界面:http://127.0.0.1:8081/nexus/index.html2、点击右上角Log In进行登录,默认帐号:admin、密码:admin1233、点击左侧Repositories项 -> central仓库 -> Configuration -> Download Remote Indexes=True -> Save,表示下载远程仓库的索引。4、右键central仓库 -> Update Index,更新远程仓库索引到本地,这一步能够加速本地索引。
Maven配置 配置Maven默认使用本地仓库,修改setting.xml全局配置文件。
$ vim ~/.m2/setting.xml
<?xml version="1.0" encoding="UTF-8"?><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <!-- 配置central镜像地址为本地仓库,加速索引速度 --> <mirrors> <mirror> <id>central</id> <mirrorOf>central</mirrorOf> <name>central</name> <url>http://127.0.0.1:8081/nexus/content/repositories/central</url> </mirror> </mirrors> <!-- 配置发布仓库,第一个为正式版仓库,第二个为快照版仓库。 --> <profiles> <!-- 执行:$ mvn release:prepare 命令时会打包并发布到该仓库。 --> <profile> <id>nexus</id> <repositories> <repository> <id>nexus</id> <name>local private nexus</name> <url>http://127.0.0.1:8081/nexus/content/groups/public</url> </repository> </repositories> </profile> <!-- 执行:$ mvn deploy 命令时会打包并发布到该仓库。 --> <profile> <id>nexus-snapshots</id> <repositories> <repository> <id>nexus-snapshots</id> <name>local private nexus snapshots</name> <url>http://127.0.0.1:8081/nexus/content/groups/public-snapshots</url> </repository> </repositories> </profile> </profiles> <!-- servers节点的属性是在向仓库发布时使用 --> <servers> <server> <id>nexus-releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>nexus-snapshots</id> <username>admin</username> <password>admin123</password> </server> </servers> <!-- 激活配置 --> <activeProfiles> <activeProfile>nexus</activeProfile> <activeProfile>nexus-snapshots</activeProfile> </activeProfiles></settings>
参考
官方教程:http://sonatype.com/books/nexus-book/reference/index.html很详细的教程:http://juvenshun.iteye.com/blog/349534
0 0
- Maven+Nexus私服搭建
- maven搭建私服nexus
- Maven Nexus私服搭建
- maven nexus 搭建私服
- maven nexus私服搭建
- maven nexus私服搭建
- Maven+Nexus私服搭建
- Maven 搭建私服(nexus)
- Maven私服搭建(nexus)
- maven的私服搭建 Maven Nexus
- maven和私服nexus搭建教程
- 使用Nexus 给maven 搭建私服
- Maven及Nexus私服搭建
- maven搭建nexus私服过程
- maven nexus 的私服搭建
- 使用nexus为maven搭建私服
- Maven-Nexus私服搭建(四)
- maven项目--使用nexus搭建私服
- null字段作为where条件 的问题
- 冬令营第二周周报
- pptpd安装配置
- 今天参加了球友会的k歌聚餐活动, 好开心!
- maven安装jar包到本地maven库
- Maven+Nexus私服搭建
- 浅析vps为何这么脆弱,彻底防御ARP攻击?
- 1023. Have Fun with Numbers (20)
- js文件找不到对应的action的路径
- SPOJ 705 子串个数 后缀数组
- 告别CSDN好多年终于又回来了
- 开Axis设置Axis2 Preferences不对或不设置出现的错误
- 浅析 Protocol Buffer 编码格式
- ImageView的属性android:scaleType作用