I was just playing with this and thought I would share what I have found so far.
Configuration is fairly straight forward when using the `maven-publish` plugin.
https://docs.gradle.org/current/userguide/publishing_maven.html
apply plugin: "maven-publish" publishing { repositories { maven { name = "Github" url = uri("https://maven.pkg.github.com/owner/repo") //TODO update owner/repo credentials { //findProperty will allow these properties to be absent and still run the build, just won't publish username = findProperty("GITHUB_USERNAME") password = findProperty("GITHUB_API_TOKEN") } } } publications { register("jar", MavenPublication) { from(components["java"]) pom { url.set("https://github.com/owner/repo.git") //TODO update owner/repo } } } }
I am unable to upload classified artifacts, IE sources jar.
Could not PUT 'https://maven.pkg.github.com/owner/repo/com/owner/repo/x.y.z/ArtifactId-x.y.z-sources.jar'. Received status code 403 from server: Forbidden
I sent in a support request on the classified artifacts being rejected, as well as a request to add gradle to the documentation.
My hope is that they will also have decent support for gradle projects producing `.module` metadata by the time it reaches general release as well.
https://github.com/gradle/gradle/blob/f6a98158e75a636245f70d46604fcab3152361e8/subprojects/docs/src/...
Solved! Solved! Go to Solution.
Hej man any news on that?
I have the same issue that my sources.jar gets rejected
@MarvinSchramm They responded asking for reproduction steps which I provided and have not heard anything since then.
additionally they don't handle the maven-metadata.xml correctly which results in 400 errors when gradle tries to read what is there before publishing a new snapshot.
Yea i've noticed that.
Now we have 1 half published package on our repository which we cant delete...
I think we'll wait until everything is out of beta.
Thank you!
I have the same issues, I've had nothing but issues, this looks like such a useful thing but it seems funamentally broken at the moment.
@trevjonez Running into the same issue as well. Support ticket in but nothing yet. Any updates on your side?
Same Here! @MarvinSchramm did it work for u???
Same problems from me. I am able to publish the pom files with package registry, but beyond that, everything is rejected. People said that I might need pom properties in my jar, but that doesn't help in any way.
Addiiton of pom properties:
The packages with pom only:
Anyone figured out how to uplaod sources and javadoc ? I am similarly with a half published package.
I just ran into the same issue. For me it did upload the build .jar and the .pom file but it rejected the sources and javadoc. The publication can be found here: https://github.com/guthix/Jagex-Store-5/packages/32130.