Maven registry, artifact duplication

Hello,

I started using Gitlab Maven Registry (latest version of Gitlab 18.3.1). But when I publish an artifact I already published (same group, same name and same version), Gitlab doesn’t override the existing artifact but doesn’t either return an error.

I am using Gradle, here is my build.gradle:

plugins {
    id 'java'
    id 'maven-publish'
}

group = 'net.redheademile'
version = '1.0'

repositories {
    mavenCentral()
    maven {
        url = "http://gitlab/api/v4/packages/maven"
        allowInsecureProtocol = true
        name = "GitLab"
        credentials(PasswordCredentials) {
            username = gitlabPersonalUsername
            password = gitlabPersonalToken
        }
        authentication {
            basic(BasicAuthentication)
        }
    }
}

dependencies {
    implementation 'org.slf4j:slf4j-simple:2.0.17'

    testImplementation platform('org.junit:junit-bom:5.10.0')
    testImplementation 'org.junit.jupiter:junit-jupiter'
}

publishing {
    publications {
        library(MavenPublication) {
            from components.java
        }
    }
    repositories {
        maven {
            url = "http://gitlab/api/v4/projects/20/packages/maven"
            allowInsecureProtocol = true
            credentials(PasswordCredentials) {
                username = gitlabDeployTokenUsername
                password = gitlabDeployTokenValue
            }
            authentication {
                header(BasicAuthentication)
            }
        }
    }
}

test {
    useJUnitPlatform()
}

To publish, I run gradle publish (which produce BUILD SUCCESS even if the artifact already exists).

Is it a normal behaviour ?