I have deploy my fist version to the maven central repository. Now I want sync this to JCenter / Bintray. Is this possible and how can I do this?
Yes, all you need to do is just download your artifacts from JCenter.
On a related note, I'd suggest doing it the other way around - publish to JCenter and sync to Central. It should be easier for you.
I am with JFrog, the company behind Bintray and [artifactory], see my profile for details and links.
Related
I have a library shared in JCenter, which I post to through Bintray.
Recently, it is announced JCenter and Bintray are sunsetting, and many advised us to go to MavenCentral. I'm looking to move migrate it over.
Then I notice within the Bintray, it is stated my library is on Maven too, and the user can get my library using
maven {
url "https://dl.bintray.com/elye-project/maven"
}
So I'm confused, does that means I am already in Maven? Is this is just another name for JCenter and will not be available as well?
As I read more, I found an article stating we can publish our library from Bintray to MavenCentral too.
I also read if I need to submit my library to MavenCentral, I need to first create an issue in Sonatype.
Then I saw Sonatype is actually having Nexus Repository Manager. Then I find OSSRH uses Nexus Repository Manager.
I am super confused about what these terms are, and how are they related?
Bintray, JCenter, Maven, MavenCentral, OSSRH, Sonatype, Nexus.
Can someone give a brief description about them, and help to connect the dot for me?
MavenCentral is the place where Java open source artifacts should be published
JCenter was such a place.
Maven is a build system, not a repository. Many repositories have Maven format, which makes them readable from Maven and Gradle.
Sonatype Nexus and JFrog Artifactory are repository managers. You can install them to manage internal and external artifacts on your own server, which is advisable inside a company.
I have built an artifact with gradle that I now need to upload to Nexus. What is the best way to do this?
Gradle's Maven Publish plugin can be used for that. The documentation is clear enough I think, you will find there examples that you can adapt for uploading to Nexus repositories.
I have published a small library to Maven Central (it can be downloaded via web UI here). This was done more than a full day ago.
My understanding is that JCenter mirrors Maven Central, but for some reason I cannot find my artifact in JCenter both via web interface and as part of Maven build.
Do I need to take some action to make it appear in JCenter too?
Basically, if you want to make sure that your library will exist in JCenter, you can upload your library to Bintray under Maven repository, and request to add it to JCenter.
Bintray can also save you the trouble of uploading your library to Maven Central, and do it for you.
Enjoy
Two weeks later the artifact is now visible in JCenter. Apparently it just takes some time to appear there.
I'd like to publish my OSS library to be available in both jcenter and maven-central repositories. I have 2 questions related with this topic:
Should I publish by my own to both repositories, or there is some automated sync between them, so will be enough to publish only to one of them? If there is a sync, which one is the primary source and which when is mirrored?
I'd like to perform publish automatically from gradle, using some gradle plugin. Is there any single plugin, being able to work with both repositories?
JCenter is a super-set of Maven-Central and it syncs automatically with the package published to Maven-Central, so essentially artifacts published to Maven-Central will be automatically synced and available in JCenter as well.
Gradle has two plugins supporting publishing to several repositories types, including Maven-Central and JCenter: (1) A "legacy" maven plugin and (2) a new incubating maven-publish plugin.
For sure you need to publish to only one, and another one should pick it up from there. The question is which one to select?
Although #amnon-shochot's solution works, I'd suggest much easier solution: doing it vice-versa and going with Bintray as a main distribution platform.
Publishing to Bintray is much easier than publishing to Maven Central, and Bintray supports a very easy way to sync whatever you published to Bintray's JCenter to Maven Central.
Also, most of Gradle users already prefer jcenter() over mavenCentral() cause it's faster, more reliable, gives you much more as a publisher and more secure.
You can publish to Bintray from Gradle using Bintray Gradle plugin, which support verity of methods to specify what should be published (configurations, publications, filesets, etc.)
I am with JFrog, the company behind Bintray and [artifactory], see my profile for details and links.
I am having issues with hosting maven jars with Github (site-maven-plugin) so I want to move with Bintray asap.
What are the steps to host a existing maven jar in bintray?
Here is my error when doing: mvn releae prepare
Caused by: org.apache.maven.shared.release.ReleaseFailureException: You don't have a SNAPSHOT project in the reactor projects list.
What I have now is I can do mvn clean install with no problems at all. Can I just upload the files under ./m2 repo? I basically uploaded the .jar and .pom I found in the maven repository.
How can I access the library I uploaded on Bintray from my pom.xml?
You can get started with publishing from Maven to Bintray by copy-pasting some pom parts from "Set Me Up" guide:
Full user manual is available as well.
Please note, that you can't upload SNAPSHOTs to Bintray. It's a distribution platform and it is not intended for development process.
Saying that, you are welcome to take advantage of a free Artifactory account for hosting your snapshot during development.
Using OJO you don't need to use the troublesome Maven Release Plugin anymore. Once you're satisfied with the snapshots quality you can promote them to be releases and upload them to Bintray in one REST call (or click of a button in Jenkins),