Reputation: 90033
When I invoke gradle publishPubNamePublicationToRepoNameRepository
to an empty repository sitting on a private server, I get an error:
11:57:35.266 [ERROR] [org.gradle.api.publication.maven.internal.action.LoggingMavenTransferListener] Could not transfer metadata com:foo-bar:1.1.25-SNAPSHOT/maven-metadata.xml from/to remote (https://serverHostname/snapshots): Could not get resource 'com/foo/bar/1.1.25-SNAPSHOT/maven-metadata.xml'
which causes the build to fail. Is there a way to suppress this error? I believe the failure is normal given that the repository is empty and this file will get created after the first deploy. At most, I am expecting this to be a warning. Any ideas?
Upvotes: 1
Views: 1101
Reputation: 90033
The error message is misleading. The problem was that user lacked read permission to the repository. It seems that the permission denied error is treated differently than file not found, but Gradle reports the same error in both cases.
Granting the user read permission fixed the problem.
Upvotes: 2