preface

With jCenter hosting services likely to be discontinued soon, it is imperative to migrate jar/ AAR packages from JCenter to Mavan Central. This article focuses on the issues you need to pay attention to when uploading jar/ AAR packages to MavenCentral.

Please make sure you are familiar with the process and steps of uploading MavenCentral before reading this article, otherwise you may not know what I am talking about, hahaha. How to upload a local JAR/AAR package to Mavan CentralMavenCentral publishing guideandSonatype OSSRH publish guide.

The body of the

Com.github will no longer be a valid Group Id prefix

The following statement is quoted from Central Repository Changelog

2021-04-01 – com.github.* is not supported anymore as a valid coordinate

com.github will no longer be supported as a valid groupId prefix. Github has announced that they will stop redirecting GitHub Pages sites from *.github.com to the *.github.io domain, and requested that coordinates for individual projects only use io.github prefixes from now on.

Current projects already using the com.github groupId in Central are not affected by this change.

My blunt translation is:

2021-04-01-com.github.* no longer supported as valid coordinates ︎

Com.github will no longer be supported as a valid groupId prefix. Github has announced that they will stop redirecting Github Pages from *.github.com to the *.github.

Current projects that already use com.github as groupId in the central repository are not affected by this change.

Therefore, when creating problems on Sonatype, we should enter the Group Id as io.github. XXX instead of com.github. XXX. Therefore, we try to prefix the project package name on Github with IO. Github. XXX. For details about the Group Id, see the official documents.

New server s01.oss.sonatype.org

The following statement is quoted from Central Repository Changelog

2021-02-25 – New server s01.oss.sonatype.org

New projects will be allocated in the new server s01.oss.sonatype.org. Old projects using oss.sonatype.org instance are not affected by this change.

My blunt translation is:

2021-02-25 – New server s01.oss.sonatype.org︎

New projects will be assigned to the new server s01.oss.sonatype.org. Older projects using the oss.sonatype.org instance are not affected by this change.

For example, the upload address in the build.gradle script for MavenCentral should be updated to the new address as follows:

Oss.sonatype.org/service/loc… – > s01.oss.sonatype.org/service/loc…

Oss.sonatype.org/content/rep… – > s01.oss.sonatype.org/content/rep…

 repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
     authentication(userName: ossrhUsername, password: ossrhPassword)
 }

 snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
    authentication(userName: ossrhUsername, password: ossrhPassword)
 }
Copy the code