本文共 518 字,大约阅读时间需要 1 分钟。
Nexus 是Maven仓库管理器,可以用来搭建公司的私服。
Nexus安装
从官网下载压缩包,解压到指定路径,进入bin,启动nexus 运行命令: ./nexus start
然后在浏览器进行访问,地址:账号密码 admin/admin123
nexus仓库
1,hosted,本地仓库,通常我们会部署自己的构件到这一类型的仓库,例如公司自己的程序jar包,或者第三方jar包
2,proxy,代理仓库,它们被用来代理远程的公共仓库,如mavan的中央仓库。
3,group,仓库组,用来合并多个Host/proxy仓库,把orderedRespository列表的仓库放到右边就可以了,然后在maven配置里面配置仓库组。
上传本地jar
因为企业开发,会需要上传自己开发的jar或者第三方的jar。首先需要登录账号,获取权限,现在推荐使用界面操作,实际也可以用maven命令进行上传
选择release本地库,然后选择ArtifactUpload,选择GAV Parameters,填入参数,packing选择jar,然后选择上传的jar就可以了,默认的public仓库组是包含了这个Release本地库,所以直接引入就可以了。