您的位置:首页 > 其它

nexus配置 Releases和Snapshots的权限

2012-10-14 18:48 120 查看
前提条件:

1、安装了nexus

2、配置了release和snapshots
http://192.168.122.164:8081/nexus-2.1/content/repositories/releases/ http://192.168.122.164:8081/nexus-2.1/content/repositories/snapshots/
配置权限:

1、添加权限

定位到Security 下的Privileges 并且点击右边Add..进行添加:添加release和snapshots 配置如下:



之后点击Save进行保存

2、建立权限

定位到Security 下的Role 并且点击右边Add..进行添加刚才配置的:release和snapshots 如下:



点击Save进行保存

3、和用户进行绑定

定位到Security 下的Users 选择deployment用户 添加刚刚建立的权限:



点击Save保存

授权完毕 注意一定要重新启动tomcat 才会生效。

其他用户根据
http://192.168.122.164:8081/nexus-2.1/content/repositories/releases/ http://192.168.122.164:8081/nexus-2.1/content/repositories/snapshots/
就可用发布到 私服上了

注意用户需要在本机配置登录的用户名密码

1、打开maven 的setting文件添加如下配置

<server>

<id>releases</id>

<username>admin</username>

<password>admin123</password>

</server>

<server>

<id>snapshots</id>

<username>deployment</username>

<password>deployment</password>

</server>

2、将项目进行发布 需要在pom.xml配置如下:

<distributionManagement>

<repository>

<id>releases</id>

<url>http://192.168.122.164:8081/nexus-2.1/content/repositories/releases/</url>

</repository>

<snapshotRepository>

<id>snapshots</id>

<url>http://192.168.122.164:8081/nexus-2.1/content/repositories/snapshots/</url>

</snapshotRepository>

</distributionManagement>

注意配置中的id需要与服务器读releases和snapshots进行对应
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: