【发布时间】:2013-10-04 08:45:34
【问题描述】:
我在pom.xml 文件中添加了以下依赖项:
<dependency>
<groupId>org.tuckey</groupId>
<artifactId>urlrewritefilter</artifactId>
<version>4.0.4</version>
</dependency>
我有很多 maven 依赖项,但是当我添加上面的依赖项时,我得到:
Failed to read artifact descriptor for org.tuckey:urlrewritefilter:jar:4.0.4: Could not transfer artifact org.tuckey:urlrewritefilter:pom:4.0.4 from/to central (http://app1.stage.server.net/artifactory/libs-release): Not authorized, ReasonPhrase:Unauthorized. -> [Help 1]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
settings.xml 文件的外观如下:
..
<servers>
<server>
<username>user</username>
<id>central</id>
<password>my-password</password>
</server>
<server>
<username>user</username>
<id>snapshots</id>
<password>my-password</password>
</server>
</servers>
<profiles>
...
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
..
有什么帮助吗? tnx。
【问题讨论】:
-
我自己没有看到这条特定消息,但错误表明您正在尝试使用您的服务器来检索包,该用户使用您经过适当身份验证的用户,但根据服务器未授权使用此服务。请与您的服务器管理员联系,以确保您使用的用户应该能够使用您的服务器,并且实际上已正确配置为这样做。
-
是的.. 它工作正常,因为我添加了大约 100 个依赖项并且它们都工作正常,我只有这个问题。
-
这是 maven 服务器上的配置问题。
-
配置问题是什么?我有同样的症状。数百个工件中的一个不会从我的远程存储库中复制。我可以清除我的本地存储库,并通过我们的 Nexus 存储库代理下载数百个工件,但其中一个将完全按照此处描述的“未授权,ReasonPhrase:未授权”失败。我可以登录到存储库的 Web UI 并手动下载它。