centos搭建maven私服
来源:互联网 发布:手机常用的网络制式 编辑:程序博客网 时间:2024/06/03 23:42
1、下载nexus
地址:
http://www.sonatype.com/download-oss-sonatype(话说已经不能下载了,只能去csdn上找找)
nexus-2.5.X及之前版本支持jdk1.6
nexus-3.0.X需要jdk1.8
本次使用的是nexus-2.5.1版本
2、安装nexus 解压nexus至/usr/local/nexus目录 解压出两个文件夹: nexus-2.5.1-01 nexus程序目录 sonatype-work 下载的jar文件
3、运行nexus 执行/usr/local/nexus/nexus-2.5.1/bin/nexus start命令启动nexus
4、配置nexus
(1)nexus默认端口为8081,如启动后外部无法访问,需要在iptables中开启8081端口
vim /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT service iptables restart
(2)nexus默认用户名admin,默认密码admin123
(3)仓库类型详解
hosted 类型的仓库,内部项目的发布仓库
releases 内部的模块中release模块的发布仓库
snapshots 发布内部的SNAPSHOT模块的仓库
3rd party 第三方依赖的仓库,这个数据通常是由内部人员自行下载之后发布上去
proxy 类型的仓库,从远程中央仓库中寻找数据的仓库
group 类型的仓库,组仓库用来方便我们开发人员进行设置的仓库
(3)开启中央仓库的nexus索引 点中Central仓库,
Configuration中Download Remote Indexes修改为True 点击save按钮
5、开发机配置
maven目录下conf/settings.xml,将<profiles></profiles>中增加
<profile> <id>dev</id> <repositories> <repository> <id>nexus</id> <url>http://192.168.0.59:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <url>http://192.168.0.59:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile>
最后加入dev引用
<activeProfiles> <activeProfile>dev</activeProfile> </activeProfiles>
参考资料
http://blog.csdn.net/shenshen123jun/article/details/9084293
http://www.cnblogs.com/quanyongan/archive/2013/04/24/3037589.html
http://www.blogjava.net/baoyaer/articles/355040.html
- centos搭建maven私服
- 【Maven】centos搭建maven私服
- Centos中nexus搭建maven私服
- Centos 环境搭建之Maven私服nexus
- CentOS 6.5搭建Nexus Maven私服
- centos下 Maven 私服nexus 搭建教程
- centos 搭建 maven nexus
- Centos 基础开发环境搭建之Maven私服nexus
- Centos搭建持续集成(六)----安装Maven以及nexus3私服
- Centos+Sonatype Nexus 搭建Maven私有库
- centos使用nexus搭建私有maven仓库
- 在操作系统Centos 6.3 上使用Nexus 2.8搭建MAVEN私服 及 cloudstack 开发环境
- 搭建Maven私服
- Nexus搭建Maven私服
- 搭建Maven私服
- 搭建Maven私服
- Nexus搭建Maven私服
- 搭建Maven私服
- JQuery实现画面的隐藏功能
- SharedPrefence 中context mode属性的意思
- nodeJs 接收上传文件
- Base64和Bitmap的相互转换
- 图片上传
- centos搭建maven私服
- mongoDB 启动与停止
- PullToRefreshListView注意事项
- 来自2016年上半年的.ISO
- java.lang.IllegalArgumentException 错误
- const用法大集合
- Unity视频播放插件(AVPro Windows Media)
- 一些好的Android开发习惯
- iOS添加导航栏的三种方式