maven私服搭建与使用
2019-02-15 16:59
357 查看
maven私服搭建与使用
-
使用场景 :公司不能连接公网、公司内部jar组件的共享。
-
nexus下载安装下载地址
#解压
shell>tar -zxvf nexus-2.14.5-02-bundle.tar.gz#在环境变量当中设置启动用户
shell> vim /etc/profile#添加profile文件。安全起见不建议使用root用户,如果使用其它用户需要加相应权限
export RUN_AS_USER=root*配置启动参数:
shell> vim ${nexusBase}/conf/nexus.properties
#端口号
application-port=9999
启动与停止nexus
#启动
shell> ${nexusBase}/bin/nexus start
#停止
shell> ${nexusBase}/bin/nexus stop
登录nexus 界面
地址:http://{ip}:9999/nexus/
用户名:admin
密码:admin123
#防火墙关闭状态
-
nexus 仓库介绍:
3rd party:第三方仓库 Apache Snapshots:apache 快照仓库 Central: maven 中央仓库 Releases:私有发布版本仓库 Snapshots:私有 快照版本仓库
-
本地远程仓库配置:
在本地远程仓库配置
<repositories> <repository> <id>nexus-public</id> <name>my nexus repository</name> <url>http://192.168.0.147:9999/nexus/content/groups/public/</url> </repository> </repositories>
在settins 文件中配置远程仓库镜像,但作用范围广了
<mirror> <id>nexus-aliyun</id> <mirrorOf>*</mirrorOf> <name>Nexus aliyun</name> <url>http://192.168.0.147:9999/nexus/content/groups/public/</url> </mirror>
-
发布项目至nexus远程仓库
配置仓库地址
<distributionManagement> <repository> <id>nexus-release</id> <name>nexus release</name> <url>http://192.168.0.147:9999/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>nexus-snapshot</id> <name>nexus snapshot</name> <url>http://192.168.0.147:9999/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
在settings 中设置server
<server> <id>nexus-snapshot</id> <username>deployment</username> <password>deployment123</password> </server> <server> <id>nexus-release</id> <username>deployment</username> <password>deployment123</password> </server>
执行deploy 命令
mvn deploy
相关文章推荐
- maven--私服的搭建(Nexus的使用)
- 使用Nexus搭建Maven私服
- Maven学习 (四) 使用Nexus搭建Maven私服(转)
- Linux 使用nexus搭建maven私服
- Maven入门指南11:使用Nexus搭建Maven私服
- maven--私服的搭建(Nexus的使用)
- Maven学习之使用Nexus搭建Maven私服 (四)
- maven--私服的搭建(Nexus的使用)
- Maven入门之使用Nexus搭建Maven私服及上传下载jar包
- Maven学习 (四) 使用Nexus搭建Maven私服
- maven 学习总结(九)——使用Nexus搭建Maven私服
- 使用Nexus搭建Maven私服
- 使用nexus为maven搭建私服
- windows下使用nexus搭建maven私服(一)
- 使用Nexus搭建Maven私服
- Linux 使用nexus搭建maven私服
- maven的安装和使用,myeclipse的整合和使用,私服的搭建和使用,eclipse的整合和使用
- Maven学习使用Nexus搭建Maven私服
- Linux下使用nexus搭建maven私服
- 使用Nexus2.x为Maven3.x搭建私服构件仓库