2013-10-04 177 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。

相關問題