Some weeks ago I tried to get help for a problem (How to publish different build artifacts from the same subproject?). Sadly, I got no answer.
After retrying to solve my problem, I come to the opinion that there is a bug in the Maven publishing implementation.
The docs say āClears any previously added artifacts from MavenPublication.getArtifacts() and creates artifacts from the specified sourcesā.
In my subproject Iām overwriting publishing with this
publishing.publications {
mavenJava(MavenPublication) {
artifacts = [ serverJarWithoutAnnoProfile ]
}
}
Which means, for my understanding: publishing should just take the artifact from the task āserverJarWithoutAnnoProfileā. The expected jar from this task is built by the task, but not this jar is uploaded; instead publishing uploads the regular jar for this subproject which is not what I expect it to do.