3

I am struggling with uploading two files to Nexus repository using maven-publish plugin. The problem is that I want to set my own name for one of the files. The task source code is:

publications {
    nexus(MavenPublication) {
       artifact ("file1.tgz") {
          extension "tgz"
       }
       artifact ("file2.sh") {
          extension "sh"
       }
    }

Files are uploaded correctly but names are the same as project name. The point is that I would like to both artifacts to remain their original names. Has anyone faced similar problem? I tried different hacks but no effect.

user3450486
  • 215
  • 4
  • 16

1 Answers1

2

try using artifactId

publications {
    nexus(MavenPublication) {
        artifact ("file1.tgz") {
            artifactId "file1"
            extension "tgz"
        }
        artifact ("file2.sh") {
            artifactId "file1"
            extension "sh"
        }
    }
}
oxymor0n
  • 1,089
  • 7
  • 15