CentOS 下搭建maven仓库及安装nexus
来源:互联网 发布:网络用语pf是什么意思 编辑:程序博客网 时间:2024/05/23 00:08
1、搜索下载nexus-2.11.4-01-bundle.tar.gz
2、上传文件到目标机器,解压后
tar zxvf nexus-2.11.1-01-bundle.tar.gz
mv nexus-2.11.1-01 /usr/local/nexus
3、然后到这个目录bin下执行
./nexus start 即可启动nexus,然后打开浏览器访问即可。
启动时如果有warn修改配置文件。
启动nexus非常简单!
4、做到上面的只能说nexus的页面可以访问了,但是要用它做私有中央仓库还差最后一步,为nexus配置依赖jar包
访问nexus的页面,登录(admin/admin123)
点击左侧的repositories>Central
然后找到Central的configuration
设置override local storage localtion,把本地的仓库路径粘贴上去,保存
这样你就能像访问阿里云的maven仓库一样访问自己的私有仓库,同时将maven的setting.xml中仓库路径修改为你的私有nexus路径
比如:xxx.xxx.xxx.xxx:8081/nexus/content/groups/public
因为是离线搭建的就只有简单的文字描述。同时maven的安装经营可以参考这一篇文字:
http://blog.csdn.net/u011350541/article/details/53096680
maven的核心就是仓库和配置!
尤其需要注意的是maven默认配置都是被注释掉的,例如<!--**************-->你需要把注释删掉,你的配置才会生效
nexus安装可参考:
http://www.centoscn.com/CentosServer/test/2015/0827/6065.html
nexus配置:
http://blog.csdn.net/dhmpgt/article/details/9998321
2017.2.8补充
这篇文章其实问题还挺多的
尤其是后面增加jar到本地仓库时,下载无效。
目前我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"> <localRepository>D:\mavenrepos\repository</localRepository> <mirrors> <mirror> <id>nexus-local</id> <mirrorOf>*</mirrorOf> <name>nexus-local</name> <url>http://172.16.15.19:8081/nexus/content/groups/public/</url> </mirror> <mirror> <id>nexus-aliyun</id> <mirrorOf>*</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror> </mirrors> </settings>
其实第二个mirror我是不需要的,因为我的nexus已经配置了阿里云作为中央仓库了,这属于重复配置了
目前还存在一个问题是nexus如何增加个性化的第三方jar包,即并非网上开源的jar包,属于自己的jar包该如何加上去?
- CentOS 下搭建maven仓库及安装nexus
- centos使用nexus搭建私有maven仓库
- CentOS安装nexus(Maven仓库管理器)
- centos 安装配置 nexus maven私有仓库
- CentOS安装nexus(Maven仓库管理器)
- CentOS安装nexus(Maven仓库管理器)
- Maven环境下搭建Nexus本地仓库
- Nexus 搭建 Maven 仓库
- Maven-----搭建Nexus仓库
- Maven_linux下 maven安装及nexus私服搭建
- centos下 Maven 私服nexus 搭建教程
- Linux环境下Maven仓库的搭建(nexus)及Mavan的简单使用
- centos 搭建 maven nexus
- Sonatype Nexus搭建Maven仓库
- Maven仓库搭建--nexus私服
- 使用Nexus搭建Maven仓库
- Nexus 搭建maven 私有仓库
- Sonatype Nexus 搭建Maven仓库
- 安卓开发,关于代码安全的注意点,平常开发中你有没有注意!!!
- 11-回文数2
- 解决PHP5.6的cURL扩展开启失败的问题
- java中compareTo方法详解
- 深入理解Scala中的类型系统
- CentOS 下搭建maven仓库及安装nexus
- 设置 sublime Text3 中的 Tab 键为 4 个空格
- MacPro Android7.0源码下载
- 简单PHP对称加密解密方法
- 获取openid
- 如何将 String类型 转换为日期格式 Date类型
- Certified Scrum Master课程 2016
- ROS smach-----状态之间传递用户数据
- 教你如何去除电脑QQ聊天窗口上的广告?