What is included in JCenter repository in Gradle?

GradleRepositoryMaven Central

Gradle Problem Overview


Please note that JCenter will switch to readonly mode. Avoid using it. jcenter() will be removed in Gradle 8.0.


From Gradle 1.7 there is a new public repository JCenter.

repositories {
   jcenter()
}

So I want to ask if all JAR files from Maven Central are part of this repository? And if not, from what does the JCenter repository consist of? And is JCenter more reliable from Maven Central as downtime?

Gradle Solutions


Solution 1 - Gradle

jcenter() is similar to mavenCentral(). Have a look at https://bintray.com/bintray/jcenter for more details. The JCenter guys claim that they have a better performance than Maven Central.

Solution 2 - Gradle

As mentioned in https://bintray.com/bintray/jcenter:

> JCenter is the place to find and share popular Apache Maven packages > for use by Maven, Gradle, Ivy, SBT, etc. For the most comprehensive > collection of artifacts, point your Maven at: > http://jcenter.bintray.com Want to distribute your own packages > through JCenter? You can link your package by clicking the "Include My > Package" button. And if you're into legacy, you can even synchronize > your packages directly to Maven Central.

Also I find a good compare at https://www.jfrog.com/knowledge-base/why-should-i-use-jcenter-over-maven-central/ (unfortunately the link seems dead but some useful hints are here):

> jcenter is the public repository hosted at bintray that is free to use > for open source library publishers. There are many good reasons to use > jcenter over Maven Central. Here are some of the major ones: > > > > 1. jcenter delivers library through CDN which means improvements in CI and developer builds. > 2. jcenter is the largest Java Repository on earth. This means that whatever is available on Maven Central is available on jcenter as > well. > 3. It is incredibly easy to upload your own library to bintray. No need to sign them or do any complex things like you have to on Maven > Central. > 4. Friendly-UI > If you want to upload your library to Maven Central you could do it easily with a single click on the bintray site.

Solution 3 - Gradle

New answer:

JCenter will shut down so this question will be moot. Just use Maven Central 

Old answer that applied before May 2021:

Maven Central and JCenter are mostly equivalent, from a user perspective.

The reason there are two big repositories is that Maven Central is backed by Sonatype, the company behind Maven and especially behind Nexus, a Maven repository they sell to enterprises.

JCenter is backed by JFrog, the company behind Artifactory, a competitor to Nexus. From what I remember, JFrog also backed Gradle for a while, as a competitor to Maven.

So in the end it's about competing companies offering free services to try to lure customers to their higher level enterprise offerings.

Unless you have a very specific reason to use one of them, you can basically toss a coin to choose one.

Solution 4 - Gradle

JFrog have announced that from the start of May 2021 Bintray, JCenter etc. will be deleted and no longer used. If you are using JCenter with Gradle, you should migrate to using MAven or another appropriate repository instead.

You should consider doing builds for applications that might use assets in order to download them, because there will likely be assets that aren’t available anywhere else after the shutdown and they may not be recoverable.

https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

Solution 5 - Gradle

jCenter() contains artifacts that don't exist in mavenCentral() for example com/bmuschko/gradle-cargo-plugin/2.2.3/gradle-cargo-plugin-2.2.3.jar

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionXelianView Question on Stackoverflow
Solution 1 - GradleRene GroeschkeView Answer on Stackoverflow
Solution 2 - GradleAlireza FattahiView Answer on Stackoverflow
Solution 3 - GradleoblioView Answer on Stackoverflow
Solution 4 - GradleAlBlueView Answer on Stackoverflow
Solution 5 - GradleВячеслав КалякинView Answer on Stackoverflow