I tried to release WireMock Spring Boot and got er...
# wiremock-java
t
I tried to release WireMock Spring Boot and got error:
Copy code
> Task :initializeSonatypeStagingRepository FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':initializeSonatypeStagingRepository'.
> Failed to load staging profiles, server at <https://oss.sonatype.org/service/local/> responded with status code 403, body: <html>
https://github.com/wiremock/wiremock-spring-boot/actions/runs/16259197251/job/45900862171 There is probably a simple fix: https://github.com/gradle-nexus/publish-plugin/commit/b7f2d5ad0c6bc38944c57479a9617e7aa0c7e75d I don't mind supplying a PR on https://github.com/wiremock/gradle-wiremock-extension-plugins . I hope we can all agree that
gradle-wiremock-extension-plugins
needs some love. It is currently pretty much abandoned. Nobody has been taking care of my PR:s for months. This needs to change. We should try and find a way forward on this issue.
l
Hi @Tomas Bjerre Sorry for the delay in getting back to you. I am just back off of holiday so I am catching up. Just so I am clear, is it these two PRs that need to be reviewed: https://github.com/wiremock/gradle-wiremock-extension-plugins/pull/24 https://github.com/wiremock/wiremock-spring-boot/pull/99
t
Only the gradle-wiremock-extension-plugins.
t
I'm closing 21.
l
Cool, I was going to check with you on that one ๐Ÿ™‚
t
I think merging 24 is a good start. After that I think we should only publish the plugins to Central, not to Gradle plugin portal. They dont want this kind of specific plugins there, they want plugins aimed at broader user base. I have been rejected with the motivation: "Your plugin looks too specific for you. If this is a company-specific or a personal plugin, consider using a private Maven or Ivy repository, as plugins.gradle.org is for plugins that are widely useful. You can also use init scripts to set those conventions. Otherwise, please improve your documentation to help users understand the plugin's purpose." This can be solved by copying parts of: https://github.com/tomasbjerre/conventional-release-gradle-plugin/tree/master
f
How can I help on this one? I'm new to this community and my MR has been merged but the release train is broken ๐Ÿ˜•
I'm seeing lots of work guys! Many thanks for the support. Did you succeed to publish the plugin?
t
Still no progress here. @Lee Turner @Oleg Nenashev @Tom is anyone working on this? Fastest way for me to get unblocked is probably to replace the gradle-wiremock-extensions-plugin with my own plugins.
o
Might be. Or just releasing the main branch.
Sorry for not doing it quickly. @Lee Turner asked about it, bit I didn't get to posting the proper request on the plugin portal
We should just switch all plugins to a generic account IMHO. @Tomas Bjerre - I would be also happy to add you as a maintainer if you want. No need to split if you can have access to the main repo
๐Ÿ‘ 1
t
I would argue that this is not "widely useful" and it should not be in the plugin portal. Having them only in Central would also make this kind of work easier, no need for any request on the plugin portal.
I'm ok with maintaining it.
o
What if we just hosted on GitHub Packages?
Of course, authentication is no fun
t
I think that should work. I never tried it but any Maven repository should be fine I think.
I mean, the gradle-wiremock-extensions-plugin on Github packages.
o
Better late than never. Let's get a generic release account for WireMock there as the next step
๐Ÿ™ 2
t
Looks like 0.5.0 is published now. Maby you can create it here also so that it is more visible: https://github.com/wiremock/gradle-wiremock-extension-plugins/releases
o
Sorry, it is my bad. I started implementing the release pipeline but actually forgot to release the tag
t
Getting an error when using 0.5.0. Perhaps this fixes it: https://github.com/wiremock/gradle-wiremock-extension-plugins/pull/27
Feel free to try any fix in the gradle-wiremock-extension-plugins by releasing the draft here: https://github.com/wiremock/wiremock-spring-boot/releases
o
Done. FWIW it is a temporary solution as. one ideally has to move to new APIs https://cookbook.gradle.org/integrations/maven-central/publishing/ . It has been on my list nbut got quite overloaded
t
0.5.1 still not available. Perhaps something went wrong during publish, still 0.5.0 also in the portal: https://plugins.gradle.org/plugin/org.wiremock.tools.gradle.wiremock-extension-convention
I tried making the adjustments in the build.gradle of wiremock spring boot: https://github.com/wiremock/wiremock-spring-boot/blob/6c9ad43283339d9e49fa17c833251bf73e3abe17/build.gradle#L79-L88 But I still get 401 during publish: Failed to load staging profiles, server at https://ossrh-staging-api.central.sonatype.com/service/local/ responded with status code 401, body: https://github.com/wiremock/wiremock-spring-boot/actions/runs/16970043763/job/48104241374 Are the
OSSRH_USERNAME
and
OSSRH_TOKEN
environment variables correct?
o
@Lee Turner @Tom ^ we need admins here
0.5.1 still not available.
Got notifications emails @Tomas Bjerre. Should be fine now
t
Am about to board a plane but will see if I can sort this out...
Failing that I can do it tomorrow
Those variables arenโ€™t valid any more since Sonatype switched off their Nexus method for publishing. You now ned to use their new central portal with the new credentials. WireMock core is being published this way (using a different publish plugin) so I suggest replicating this if you can.
๐Ÿ‘ 1
MAVEN_CENTRAL_TOKEN
is the new credential, and itโ€™s shared with the spring boot project already
t
I think it worked now when I changed the credential! Thanks!
๐ŸŽ‰ 1