How do you set the maven artifact ID of a Gradle project?

From 36.2.3. Identity values in the generated POM

publishing {
    publications {
        maven(MavenPublication) {
            groupId 'org.gradle.sample'
            artifactId 'project1-sample'
            version '1.1'

            from components.java
        }
    }
}

The artifact ID defaults to the project name configured in settings.gradle, which in turn defaults to the project directory’s name.

You’ll need the appropriate plugin.

plugins {
    id 'maven-publish'
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)