Reputation: 16108
I'm getting the error
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
when publishing to Maven from Gradle with the command:
gradle publish
What could cause this?
Upvotes: 3
Views: 1645
Reputation: 16108
So this was caused by an invalid URL. I had this in my build.gradle file:
http://nexus:8081/content/repositories/snapshots
and I needed this:
http://nexus:8081/nexus/content/repositories/snapshots
You have to look pretty closely at the --debug logs to see this error:
[DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@274364f26 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)}
Upvotes: 3