管理maven私服(Nexus)

另一篇讲过 Nexus的搭建和使用 

本章讲解Nexus的管理

目录

仓库常用结构

上传项目到私服中

私服设置密码


仓库常用结构

maven-public--代理仓库,也就是从中央库下载下来的

maven-releases--私有仓库发行版,也就是私有项目

maven-snapshots--私有仓库bate版

上传项目到私服中

服务端无须额外配置;客户端有两处配置:需要注意的是两处的id需要一一对应

1、maven的setting.xml

 	
    
		releases
		admin
		admin123
	
	
		snapshots
		admin
		admin123
	
  

2、需要上传项目的pom.xml


  	
            releases
	    http://………………/repository/maven-releases/
  	 
  	
            snapshots
	    http://………………/repository/maven-snapshots/
  	 

然后上传执行命令mvn deploy即可;如果集成在开发工具中,记得重启开发工具。

私服设置密码

设置密码步骤如下:

1、服务端

管理maven私服(Nexus)_第1张图片

2、客户端:maven的setting.xml

 
	
		nexus
		admin
		admin123
	
  

然后重启maven即可,如果集成在开发工具中,记得重启开发工具。

3、其他用户权限

可以在Security的Roles配置规则,在Users中创建用户;

你可能感兴趣的:(maven)