【发布时间】:2012-05-24 19:24:43
【问题描述】:
我已经安装了一个 sonatype nexus 作为我的 maven repo。 nexus 安装正在使用 Active Directory 对用户进行身份验证,并且匿名登录已关闭。
将工件上传到我的存储库的每个用户都必须使用唯一的用户名进行标识,因此 AD 集成。
使用此结构的常规方法是在POM.xml 中设置 Distribution Managemente 标记,以便将工件发送到 nexus
<distributionManagement>
...
<repository>
<id>deploymentRepo</id>
<name>Internal Releases</name>
<url>http://nexusserver:8081/nexus/content/repositories/releases</url>
</repository>
...
</distributionManagement>
在本地 repo 设置 (~/.m2/settings.xml) 中添加用户名/密码组合以登录到 nexus
<server>
<id>deploymentRepo</id>
<username>deployment</username>
<password>deployment123</password>
</server>
它对我来说很好用,但我想要实现的是以某种方式在 nexus 中进行身份验证,而不必将用户密码放入本地存储库中。有可能吗?
【问题讨论】:
标签: maven active-directory nexus