I am using maven plugin for uploading artifacts to repository.
We have used two configurations to upload file into multiple repositories.
archives is used to upload jar files to repository 1.
apispec is used to upload json files to repository 2.
used below line to upload json using apispec.
def jsonArtifact = new DefaultPublishArtifact(file.getName(), "json", "json", null, new Date(), file) configurations.apiSpecs.getArtifacts().add(jsonArtifact)
apiSpecs file: file, name: file.getName(), type: 'json'
But this adding artifact to the
archives configuration as well. Due to that file is getting uploaded to both repositories.
Could someone guide me on this? Thanks