2014-09-25 190 views
0

發佈的Nexus從搖籃與命令發佈到Maven的時候,我發現了錯誤從搖籃

Error deploying artifact 'au.com.company:library:jar': Error deploying artifact: Resource to deploy not found: File: http://nexus:8081/content/repositories/snapshots/au/com/company/library/2.1-SNAPSHOT/library-2.1-20140925.222243-1.jar does not exist 

時如何解決這個問題?

回答

1

所以這是由一個無效的URL引起的。我在的build.gradle文件中有這樣的:

http://nexus:8081/content/repositories/snapshots 

,我需要這樣的:

http://nexus:8081/nexus/content/repositories/snapshots 

你必須在--debug日誌很仔細看,看這個錯誤:

[DEBUG] [sun.net.www.protocol.http.HttpURLConnection] [email protected] pairs: {null: HTTP/1.1 404 Not Found}{Date: Thu, 25 Sep 2014 22:25:16 GMT}{Cache-Control: must-revalidate,no-cache,no-store}{Content-Type: text/html;charset=ISO-8859-1}{Content-Length: 1370}{Server: Jetty(8.1.11.v20130520)} 
+0

你應該接受你自己的答案..並順便說一句,你可以運行Nexus的根內容,如果你想。只需在nexus.properties中添加上下文路徑即可。 – 2014-09-26 15:55:34

+0

您被禁止在2天內接受自己的答案。請參閱http://stackoverflow.com/help/self-answer。 「你也可以接受你自己的答案,但你必須等待48小時才能這樣做,畢竟,別人可能會更好地解決你的問題! – Phyxx 2014-09-26 21:26:56

+0

對不起......我以爲時間已經過去了 – 2014-09-27 04:42:16