我们有一个受密码保护的Maven存储库。当下载http密码时,控制台上会显示:

下载:https:// arved:[email protected]/content/groups/arved/org/apache/xbean/xbean-naming/3.7/xbean-naming-3.7.jar


是否可以某种方式隐藏密码?

最佳答案

您的存储库配置(URL)可能有误,请看此页面:
http://maven.apache.org/guides/mini/guide-encryption.html(加密是可选的)

您只需要将密码输入$ HOME / .m2 / settings.xml

<settings>
...
  <servers>
...
    <server>
      <id>arved-repository</id>
      <username>arved</username>
      <password>passw0rd</password>
    </server>
...
  </servers>
...
</settings>


并使用先前定义的server.id在pom.xml中配置存储库:

<project>
...
  <repositories>
    <repository>
      <id>arved-repository</id>
      <name>Arved Repository</name>
      <url>https://maven.arved.at/content/groups/arved</url>
    </repository>
...
</project>

07-24 21:30