Unable to publish first snapshot jar to the Sonatype OSS repo


(Allen George) #1

I’m attempting to publish my first jars to the Sonatype OSS snapshot repo. Running ‘gradle publishToMavenLocal’ works perfectly. All the POMs and artifacts are generated properly and have the correct values. Running ‘gradle publish’ fails with the following error:

https://gist.github.com/allengeorge/7373226

Running ‘gradle publish --stacktrace’ doesn’t give any more useful information.

Now, the error message is correct - the path to the metadata doesn’t exist: this is the first time I’m creating a snapshot version. I assumed the plugin would detect this and automatically create the path and the first version of maven-metadata.xml. Is this assumption incorrect? Am I doing something wrong with ‘maven-publish’?


(Peter Niederwieser) #2

I’m not sure about this exact error, but from what I know, the incubating ‘maven-publish’ plugin can’t be used for publishing to Sonatype OSS yet. (For example, it doesn’t support signing yet.) I’m successfully publishing to Sonatype OSS with the “old” ‘maven’ plugin.


(Allen George) #3

Ah. That’s unfortunate. I’ll revert my build scripts to using the ‘maven’ plugin. Thanks Peter.