What's the difference between mavenCentral and jCe...
# getting-started
j
What's the difference between mavenCentral and jCenter?
m
Not really Kotlin related, right? Basically, the main difference is who owns it. Most projects publish to both, but not all. Some will publish to one, and then wait a bit before publishing to other. Overall, generally no difference.
j
I asked because the default Kotlin IntelliJ template uses mavenCentral while I've seen Kotlin examples use jCenter. So being new on the Java platform I felt the need to see if it mattered. 🙂
m
maven central is the original artifact repository, managed by Apache. Jcenter is maintained by Jfrog
c
JCenter will also proxy everything in MavenCentral. If an artifact has not been published to JCenter but has only been published to MavenCentral, you can still resolve that artifact from the JCenter repository. But you cannot resolve JCenter-only artifacts from MavenCentral.
1
j
I see. That's useful I guess
c
A couple other differences that are worth knowing (especially for enterprise usage): 1) MavenCentral requires all uploaded artifacts to be GPG-signed, to ensure they have not been tampered with. This is optional when publishing to JCenter 2) MavenCentral requires proof that you own the domain used for a groupId. For example, for Jetbrains to publish to the
org.jetbrains.kotlin
groupId on MavenCentral, they must own the
<http://jetbrains.org|jetbrains.org>
domain or have ownership of the subdomain used in the groupId. 3) You can publish artifacts to JCenter and then have them synced to MavenCentral automatically, assuming they still meet the above criteria.
j
Cool @Casey Brooks Thanks
t
Related to @Casey Brooks answer, here is a nice article explaining why all this GPG and domain stuff is required for regular devs by @zsmb https://blog.autsoft.hu/a-confusing-dependency/
TLDL; use mavenCentral when possible!
👍 1