Multiple upload skips some jars

(Krishnadasan T S) #1


I am using gradle to Upload multiple thirdparty libraries. It works for almost all cases except one. If i have to jars with same artifactid but different groupid(I know It is not usual but possible but unfortunately there is), Gradle will only upload one artifact, I assume the last one in the process order. How can I resolve this issue.

Following are the relevent part of the code


(Krishnadasan T S) #2

sorry code is here

artifacts {

file(libPath).listFiles({file -> file.isDirectory() } as FileFilter).each{ File b ->

def defGroup = “”

def defVersion = “”


defGroup = customConfig[][“Group”]

defVersion = customConfig[][“Version”]

uploader.uploadArtifacts(b,defGroup, defVersion);



uploader.jarVersions.collect().value.each { values ->

archives file: new File ("${values[‘File path’]}"), name: “${values[‘Artifact ID’]}”, type: “${values[‘Package’]}”



uploadArchives {

dependsOn tasks.clean

repositories {

mavenDeployer {


url: repoURL) {

authentication(userName: repoUsername, password: repoPassword)


uploader.jarVersions.collect().value.each { values ->

addFilter("${values[‘Artifact ID’]}") {artifact, file -> == values[‘Artifact ID’]


pom("${values[‘Artifact ID’]}").version = values[‘Version’]

pom("${values[‘Artifact ID’]}").groupId = values[‘Group Name’]

pom("${values[‘Artifact ID’]}").artifactId = values[‘Artifact ID’]



} }