Maven Central
RobWin opened this issue · 35 comments
Hello,
could you please sync the library to Maven Central via Bintray?
Kinds regards,
Robert Winkler
I tried that, but I found the process too time consuming. Any reason why jcenter doesn't work?
On 06 Apr 2016, at 19:24, Robert Winkler notifications@github.com wrote:
Hello,
would it be possible for you to sync the library to Maven Central via Bintray?
Kinds regards,
Robert Winkler
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
Hi,
some users of Swaggger2Markup forget to add JCentral to their repo list even if it is documented and they complain about it.
It would be easier for them if they can use Maven/Gradle's default settings and just stick with Maven Central. Not all of them know JCentral or Bintray.
In understand, and while I have nothing against doing that, it costs me too much time to figure out how to do it. I have no problem with it if you want to upload it, and if you need support, I can help.
I can help you to configure Gradle. The sync itself is done by Bintray automatically when you release a Version to JCentral. https://bintray.com/docs/usermanual/uploads/uploads_syncingartifactswithmavencentral.html
You just need to create a Sontaype account and register your groupId (Create a Jira Ticket). Thats it. Takes 10 minutes.
http://central.sonatype.org/pages/ossrh-guide.html
In the Maven Central tab of Bintray, all you have to do is enter your Maven Central User token key and User token password.
I can't upload it for you.
Here is a short Tutorial
https://blog.bintray.com/2015/10/08/increase-your-maven-packages-exposure-by-adding-it-to-jcenter/
I can testify that syncing to Maven Central through bintray is a relief. Once you have your group id registered (laamella.com in my case) you can just release any artifact that uses that group id. The best thing is that bintray does the signing stuff for you - you can tell it to sign everything with one of their keys and forget about it.
Another argument for adding it to Maven Central: depending on any other than the sanctioned maven repository is a big no-no in some organisations.
Any updates on this? I would love to see this library in Maven Central.
@bodiam Do you even need guide/gradle integration? Seems like Bintray can sync the artifacts to Maven central for you and it won't make any changes to how you release the library once it's setup:
https://bintray.com/docs/usermanual/uploads/uploads_syncingwiththirdpartyplatforms.html
Seems like all you need is to create a Sontaype account and register your groupId, then setup the syncing in Bintray as @RobWin described previously.
It seems like this should take you 15 min to setup. I would have no issues with doing it for you, but I can't as I don't have access to your Bintray so you're really the only one that can do this.
As a workaround for everyone blocked by this, I've published the artifacts for 1.0 under my namespace on Maven Central. To use those however, you'll need to exclude the dependency on the official groupId and add in a new dependency groupId. Here's an example pom snippet for using swagger2markup-maven-plugin:
<plugin>
<groupId>io.github.swagger2markup</groupId>
<artifactId>swagger2markup-maven-plugin</artifactId>
<version>1.1.0</version>
<!-- Replace the dependencies that aren't in Maven Central -->
<dependencies>
<dependency>
<groupId>ca.szc.thirdparty.nl.jworks.markdown_to_asciidoc</groupId>
<artifactId>markdown_to_asciidoc</artifactId>
<!-- Keep in sync with markup-document-builder's dependency -->
<version>1.0</version>
</dependency>
<dependency>
<groupId>io.github.swagger2markup</groupId>
<artifactId>swagger2markup</artifactId>
<!-- Keep in sync with swagger2markup-maven-plugin's dependency -->
<version>1.1.0</version>
<exclusions>
<exclusion>
<groupId>nl.jworks.markdown_to_asciidoc</groupId>
<artifactId>markdown_to_asciidoc</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
jcenter is about to shut down: https://www.infoq.com/news/2021/02/jfrog-jcenter-bintray-closure/
The one publishing the library needs to sign up a Sonatype for their namespace, and will later create GPG signatures. I know this is troublesome, I've been through this.
There is a two-part blog post here covering both the signup, and the Gradle setup with a 4.x example. https://medium.com/@nmauti/sign-and-publish-on-maven-central-a-project-with-the-new-maven-publish-gradle-plugin-22a72a4bfd4b
@bodiam - is this the step-by-step guide you've been looking for? Unfortunately my working examples are Maven only. I'm willing to help when it comes to deciphering error messages with Sonatype.
With the bintray sundown in march 2021 - see https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/ there is no longer anonymous access to the library by using jcenter()
as repository setup. Also no access via maven central works.
The former mentioned workaround by @ASzc (using group ca.szc.thirdparty.nl.jworks.markdown_to_asciidoc
) does work well, but only supports version 1.0
.
@bodiam: Do you plan to migrate to maven-central?
Some hints/suggestions how to migrate to maven central
ASP deployment scripts as an example
For my https://github.com/de-jcup/asp project I have migrated my bintray uploads to maven central (via OSSH) which could be adapted by yourself to simplify the uploading to maven central
Here the relevant files:
- https://github.com/de-jcup/asp/blob/0c90eb890b28bad5dac07b1e361e7dc7597a7c6b/build-maven.gradle
- https://github.com/de-jcup/asp/blob/0c90eb890b28bad5dac07b1e361e7dc7597a7c6b/deploy.sh
You just have to call deploy.sh
and the script will ask for missing env variables etc.
NOTE: inside the official documentation they always mention ossrhUsername
- this is NOT the username you use to login at their JIRA! You must create a "user token" and use its name also this password for the ENV entries (this took my a long time to get it working...)
Official documentation
As @ahus1 mentioned there is just the - a little bit struggling - process with Sonatype, but this is only a one time process.
The official publishing documentation can be read at https://central.sonatype.org/publish/
Hi Erik,
your last comment helped a lot! Thank you for the support.
After I added
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.bodiam:markdown-to-asciidoc:2.0'
}
to my gradle build files, it worked out-of-the-box.
Additional remarks about usage by gradle/maven
When only Jitpack
I think it would be a good idea to mention the gradle/maven setup with jitpack at
https://github.com/bodiam/markdown-to-asciidoc/blob/master/README.adoc
Maven central
But I think it would still be a good idea if you would continously publish to maven central - I was not aware of jitpack and most people try to use maven central. Also it is confusing, that https://mvnrepository.com/artifact/nl.jworks.markdown_to_asciidoc is already listed, but points to another repository (where the files are no longer public available) .
From https://mvnrepository.com/artifact/nl.jworks.markdown_to_asciidoc/markdown_to_asciidoc/1.1
Note: this artifact is located at Spring Plugins repository (https://repo.spring.io/plugins-release/)
Use of the library
I am already using it quite a while inside the converter plugin bundled with eclipse-asciidoctor-editor (see https://github.com/de-jcup/eclipse-asciidoctor-editor/tree/master/asciidoctor-converter-plugin)
@bodiam any luck on having a look to publish the latest bits to Maven Central? I could help with the setup 😏
@aalmiray Hey Andres, it's quite low on my list of priority. I'm happy if you want to help!
Currently I am struggling to find the versions on jcenter as well on maven central.
I always publish on maven central, I do not see what the issue is, but okay... However, as of now JCenter is read only.
@bodiam I created a ticket to release to maven central but i need you to create a repository so they validate the ownership of the repository. So can you create this : https://github.com/bodiam/OSSRH-93228 .
Thanks.
@dgautier like this: https://github.com/bodiam/OSSRH-93228 ? I also added a TXT entry to jworks.nl, just in case.
@bodiam To finalize publishing i need access to repository settings or maybe you can do it if youd' rather not give me those rights. I'm folowing up this : https://itnext.io/publishing-artifacts-to-maven-central-using-github-actions-a-step-by-step-guide-fd65ef075fd4
You'll need to create a sonatype account if you wanna do it.
Let me know about that.
Thanks,
@dgautier I don't mind giving you access, but I can't find the controls to do it. See screenshot:
I do have a sonatype account, so I'm happy to arrange whatever you need.
@bodiam Either you give me more rights on the project (not sure which rights is required in order to add variables) or you pick the tuto at the GPG setup Chapter
(utterly off-topic, but kudos to anyone working on an issue that's 2.658 days old ;) )
@dgautier apologies for the delay. I've moved this repo now to its own organisation, otherwise it's hard (impossible?) to give the right access control. Hope this will unblock you!
@bodiam it's better but i need to redo the publication process. I created a ticket : https://issues.sonatype.org/browse/OSSRH-93793
And same as before you need to create a temp repository : https://github.com/markdown-asciidoc/OSSRH-93793
(i don't have rights on https://github.com/markdown-asciidoc, only on https://github.com/markdown-asciidoc/markdown-asciidoc)
Let me know when it's done or if you gave me rights on https://github.com/markdown-asciidoc
Thanks
Sorry for all of that. I've created the repo, I'll have a look to see how I can give you the proper rights!
Finally published it : https://repo1.maven.org/maven2/io/github/markdown-asciidoc
BAM :)
That only took 8 years. Great job!
I immediately sent a PR to asciidoctor/asciidoctor-intellij-plugin#1543
I have updated the Jamal module that integrates into the Asciidoctor IntelliJ plugin.
https://github.com/verhas/jamal/tree/master/jamal-asciidoc
This was the final dependency in the project that was at a special place and, hence, could not check automatically if the version used was up-to-date. Now you can see it is also represented in the document:
https://github.com/verhas/jamal/blob/master/versions.adoc
Thanks a lot for making it possible. It is not easy to start a new repository in maven central.
@dgautier I'd most likely want to publish a new version soon (I want to remove the Kotlin support, and maybe change the package name it's running under, so it's a bit of a breaking change, so most likely v3.0.0 or so). How can I publish a new version?
@bodiam How can i contact you ? Comments on github aren't the easiest way to discuss.
firstname.lastname at gmail !