I'm struggling to publish <my library> on maven ce...
# general-advice
a
I'm struggling to publish my library on maven central repository. I use Kotlin and Gradle. Does anyone have new experience regarding this? and possibly give me instructions?
c
Are you using the new or the old MavenCentral process?
a
I used OSSRH
c
I've been using this plugin for a few years now, it's very easy to setup and works great: https://github.com/gradle-nexus/publish-plugin
🙌🏽 1
a
Let me use their example to see if I can do it as well. One quick question. Should we add username password that is generated by central repository?
c
There's somewhere in the OSSRH UI where you can generate a token, I don't remember where though sorry
probably in your settings
a
Yea I meant that exactly, User token generator...
c
yeah you should use that as a password, and your regular username as username
a
Oh I don't know my username... I logged in using GithubOAuth
c
it's displayed in the top-right in OSSRH
sorry, in Nexus
1
a
Its now even worst 🙂 Nexus only accepts username password I cannot even log in lol
c
ah 😅 Can't help with that, sorry
a
😂 thanks, lets see what I can doo
(it includes adding the Dokka output into the javadoc JAR)
a
Copy code
In addition, for both groups of users, you need to set your Nexus credentials. To increase security, it is advised to use the user token's username and password pair (instead of regular username and password).
Seems like the user pass pair can work too according to the plugin read me
thanks I'll check it out.
I've got 403 Forbidden!😄
a
Publishing to maven is so much more difficult than it should be. I've never tried the plugin Ivan mentioned, but if you can't get it to work, it may be worth looking into https://github.com/vanniktech/gradle-maven-publish-plugin.
a
I've already struggled with this plugin @Andrew O'Hara...
🤷 1
😢 1