Skip to content

Failed to findSonatypeStagingRepository with the new configured URL to maven Portal #379

@abdelhak-cs

Description

@abdelhak-cs

After the migration to the new Maven Portal URL's , it fails to deploy if the invocation are separated :

val nexusStagingRepoURL = "https://ossrh-staging-api.central.sonatype.com/service/local/"
val nexusSnapshotRepoURL = "https://central.sonatype.com/repository/maven-snapshots/"
nexusPublishing {
    // Set the description of the staging repository.
    repositoryDescription = project.getString("VERSION_NAME")
    repositories {
        sonatype {
            stagingProfileId = nexusProfileId
            nexusUrl.set(uri(nexusStagingRepoURL))
            snapshotRepositoryUrl.set(uri(nexusSnapshotRepoURL))
            username.set(nexusUsername)
            password.set(nexusPassword)
        }
    }
}

./gradlew publishMavenPublicationToSonatypeRepository closeSonatypeStagingRepository => Success

Task :initializeSonatypeStagingRepository
Created staging repository '**********--fb701b88-69b6-41c3-a547-c2357b085058' at https://ossrh-staging-api.central.sonatype.com/service/local/repositories/***********--fb701b88-69b6-41c3-a547-c2357b085058/content/

./gradlew findSonatypeStagingRepository releaseSonatypeStagingRepository

FAILURE: Build failed with an exception.
Execution failed for task ':findSonatypeStagingRepository'.
Failed to find staging repository, stagingProfileId: , server at https://ossrh-staging-api.central.sonatype.com/service/local/ responded with status code 400, body: Endpoint /service/local/staging/profile_repositories/ not supported. Please contact Central Support (central-support@sonatype.com)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions