美文网首页
ANT如何访问增加了身份验证的远程仓库

ANT如何访问增加了身份验证的远程仓库

作者: yuhan_sining | 来源:发表于2019-11-12 11:50 被阅读0次

1、打开ivy-settings.xml
可以发现很多地方增加了远程仓库的配置,假设远程仓库的主机名为remote.server。

<resolvers>
    <ibiblio name="sonatype-releases" root="http://remote.server:8081/nexus/content/repositories/proxy-repositories" m2compatible="true" />
    <ibiblio name="maven.restlet.org" root="http://remote.server:8081/nexus/content/repositories/proxy-repositories" m2compatible="true" />
    <ibiblio name="releases.cloudera.com" root="http://remote.server:8081/nexus/content/repositories/proxy-repositories" m2compatible="true" />

    <!-- you might need to tweak this from china so it works -->
    <ibiblio name="working-chinese-mirror" root="http://remote.server:8081/nexus/content/repositories/proxy-repositories" m2compatible="true" />

2、在<ivysettings>标签下,增加远程仓库访问的用户名和密码配置即可。

  <ivy:configure>
    <credentials host="remote.server" realm="Sonatype Nexus Repository Manager" username="wkh" passwd="secret"/>
  </ivy:configure>

相关文章

网友评论

      本文标题:ANT如何访问增加了身份验证的远程仓库

      本文链接:https://www.haomeiwen.com/subject/rpbfictx.html