【问题标题】:I have a problem with Maven 3.8.4 that not allowed to authorize our private repo on Apache Archiva我对 Maven 3.8.4 有疑问,不允许在 Apache Archiva 上授权我们的私人仓库
【发布时间】:2022-01-08 12:20:49
【问题描述】:

我最近在 Macbook M1 CPU 上安装了带有 homebrew 的 Maven 3.8.4,我的 ~/.m2/settings.xml 正确地包含了 Apache Archiva 用户名和密码。

当我执行 mvn help:effective-settings -DshowPasswords=true 命令时,我可以看到正确的 xml 内容。但是当我运行 mvn clean package 时,我会得到类似的结果

Failed to read artifact descriptor for company.webshop:webshop-common:jar:21.11.12:
 Could not transfer artifact company.webshop:webshop-common:pom:21.11.12 
from/to company (https://repo.company.com/repository/internal/): 
authorization failed for https://repo.company.com/repository/internal/company/webshop/webshop-
common/21.11.12/webshop-common-21.11.12.pom,
 status: 403 Forbidden -> [Help 1]

当我尝试从浏览器访问https://repo.company.com/repository/internal/ 地址时,我也可以登录并正确查看工件。不仅如此,其他团队成员没有任何问题。

我还删除了 maven 并重新安装,但没有任何改变。

有什么想法吗?

【问题讨论】:

  • 我也在这里stackoverflow.com/questions/41228083/… 尝试了 Robert A. Decker 的方法,但没有成功。
  • 请在您的 settings.xml 中显示您的设置...
  • <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository/> <interactiveMode/> <usePluginRegistry/> <offline/> <pluginGroups/> <mirrors/> <proxies/> <profiles/> <activeProfiles/> <servers> <server> <id>company</id> <username>user</username> <password>Password1234</password> </server> </servers> </settings>

标签: maven authentication archiva


【解决方案1】:

我注意到,在删除与我们的私人仓库相关的文件夹(在 .m2 文件夹下)后,并在全新安装后重新运行 maven,它工作正常。

Maven 没有下载我猜的工件,因为有一个该版本号的文件夹,并且只显示旧文件的内容,上面写着“未授权给 repo”。并且错过了领先

【讨论】:

    猜你喜欢
    • 2017-06-16
    • 2016-05-11
    • 1970-01-01
    • 1970-01-01
    • 2017-06-30
    • 2020-01-25
    • 1970-01-01
    • 2018-08-31
    • 1970-01-01
    相关资源
    最近更新 更多