2013-10-04 124 views
7

pom.xml文件添加以下的依赖:行家无法转移神器,未经授权,ReasonPhrase:未经授权

<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。

+0

我还没有看到这封邮件我自己,但错误表明您正在尝试使用你的服务器使用你在哪里正确验证用户检索软件包,但根据未授权使用此服务的服务器。请检查您的服务器管理员,确保您使用的用户应该能够使用您的服务器,并确保其正确配置。 – DanielBarbarian

+1

是啊..它的工作正常,因为我添加了大约100个依赖关系,并且它们都工作正常,我只专门针对这个问题。 – tokhi

+0

这是maven服务器上的配置问题。 – tokhi

回答

3

我面对这个问题时,我的代理服务器没有为Maven的正确配置。您应该向网络管理员咨询代理服务器,并将其添加到conf目录下的settings.xml中。

你可以找<proxies>标记并更新领域。

当我面对这个问题时,我也觉得它只发生了几个罐子,但是其他所有必需的jar文件已经存在于我的本地存储库中,因此我只是为了几个罐子才得到它。

1

我有这个错误尝试部署到的Nexus与使用代理服务器没有设置一个Maven客户的内部实例。试图通过代理访问LAN上的Nexus实例导致了Not authorized, ReasonPhrase:Unauthorized错误。

<nonProxyHosts>internal.hostname</nonProxyHosts>固定的问题。

+0

请检查其已在settings.xml中给出的资料库或密码的访问。 – AtulJain

0

请检查其已在settings.xml中

1

给出的情况下,添加此它可以帮助别人库或密码的访问。在我的情况下,我收到了这个错误,我发现的解决方案似乎没有任何帮助。最后,我需要将config选项添加到settings.xml以将interactiveMode设置为false。

相关问题