Menu

Tree [b28f86] master /
 History

HTTPS access


File Date Author Commit
 central 5 days ago lalakii lalakii [f3c084] :memo: v2.0.2 rebuild
 gradle 5 days ago lalakii lalakii [f3c084] :memo: v2.0.2 rebuild
 sample 2025-09-28 lalakii lalakii [3c6e79] :memo: v1.2.9 - update dependencies.
 .gitignore 2024-06-27 lalakii lalakii [9486c6] v1.2.5
 LICENSE 2024-06-27 lalakii lalakii [9486c6] v1.2.5
 README.md 5 days ago lalakii lalakii [b28f86] :memo: v2.0.2 rebuild
 build.gradle.kts 2024-06-27 lalakii lalakii [9486c6] v1.2.5
 gradle.properties 2025-10-10 lalakii lalakii [b2c0de] :memo: v1.2.11 - Update dependencies and fix so...
 icon.png 2025-02-02 lalakii lalakii [7aad02] :memo: v1.2.7 - add icon
 settings.gradle.kts 2025-10-10 lalakii lalakii [b2c0de] :memo: v1.2.11 - Update dependencies and fix so...

Read Me

CentralPortalPlus

Maven Central
Codacy Badge
License: Apache-2.0 (shields.io)

CentralPortalPlus

The plugin implements sonatype's Central Publisher API (part of).

It will call maven-publish to generate artifacts and publish them to sonatype's central portal.

Note: This is a third party plugin.

Usage

Apply this plugin in gradle:

plugins {
    id("cn.lalaki.central") version "2.0.2"
}

Add configuration:

val localMavenRepo = uri("path/of/local_repo") // The path is recommended to be set to an empty directory
centralPortalPlus {
    url = localMavenRepo

    // Configure user token.
    username = "..."
    password = "..."
    // or load from xml file
    tokenXml = uri("D:\\user_token.xml")

    publishingType = PublishingType.USER_MANAGED // or PublishingType.AUTOMATIC
}

( About "user_token.xml", save it to a file. )

tokenXml

Configure maven-publish as before, doc: Maven Publish Plugin, or see: sample/build.gradle.kts

publishing {
    repositories {
        maven {
            url = localMavenRepo // Specify the same local repo path in the configuration.
        }
    }
    // ...
}

You are now ready to start the task of publishing to the Central Portal.

# windows
.\gradlew publishToCentralPortal

# other
./gradlew publishToCentralPortal

If you need to check the status of the deployment. (If no parameter is provided, the default value will be the last deployment Id)

.\gradlew dumpDeployment -PutId="deployment Id"

If you want to remove the deployment. (If no parameter is provided, the default value will be the last deployment Id)

.\gradlew deleteDeployment -PutId="deployment Id"

Note: deployments that have been successfully published cannot be deleted.

If you need to get the deployment Id, visit: Maven Central: Publishing.

End for now

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.