One build file, Multiple jars published to artifcatory issue


(prantorbora) #1

I have a gradle build file that produces multiple jars. I am trying to publish those jars to artifactory. Multiple jars are getting published to artifactory but the archive location/names are wrong.

For Example. Suppose my project name is A, and the gradle.build is producing A.jar, B.jar, C.jar. When it gets published to artifactory the location are

/MyGroupName/A/1.0.0/A-1.0.0.jar /MyGroupName/A/1.0.0/B-1.0.0.jar /MyGroupName/A/1.0.0/C-1.0.0.jar

I want it to be

/MyGroupName/A/1.0.0/A-1.0.0.jar /MyGroupName/B/1.0.0/B-1.0.0.jar /MyGroupName/C/1.0.0/C-1.0.0.jar

Any help is appreciated.

Thanks, Prantor


(Luke Daley) #2

You’ll have to do this at the POM manipulation level.

See: http://www.gradle.org/docs/current/userguide/maven_plugin.html#customizePom

(there’s a section on multiple artifacts next)