maven-publish
plugin posts JAR with name in format of "project-1.0-all.jar"
I used Maven, everything was OK. Now I've migrated to Gradle with maven-publish plugin.
Here is my publishing
Gradle build-script section
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifact(this@run["shadowJar"])
pom {
artifactId = project.name
groupId = project.group.toString()
packaging = "jar"
name.set(project.name)
description.set(project.description)
url.set("https://gitlab.com/otherwise.su/config")
inceptionYear.set("2018")
licenses {
license {
comments.set("Open-source license")
distribution.set("repo")
name.set("Лицензия")
url.set("https://gitlab.com/otherwise.su/config/blob/master/LICENSE.md")
}
}
developers {
developer {
email.set("[email protected]")
id.set("CMDR_Tvis")
name.set("Commander Tvis")
roles.set(listOf("architect", "developer"))
timezone.set("Russian Federation/Novosibirsk")
url.set("https://gitlab.com/CMDR_Tvis")
}
}
}
}
}
repositories {
maven("https://gitlab.com/api/v4/projects/10077943/packages/maven") {
credentials(HttpHeaderCredentials::class) {
name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN")
}
authentication { register("header", HttpHeaderAuthentication::class) }
}
}
}
Here's my full build-script.
Expected:
JAR with name by format "project-1.0.jar" is published.
Actual:
JAR with name by format "project-1.0-all.jar is published.
shadowJar { archiveBaseName.set('baseName') classifier = null }
– Outcurve