Hoping someone can help push us in the best direction on how to publish 3 artifacts from one project into 3 different groups.
We have a project called core-portlet and that project generates 3 artifacts
- core-portlet-service.jar
- core-portlet.war
- core-portlet.zip
We have them publishing into Artifactory in a group called com.ourcompany.foundation
What I would like is to publish them into separate sub groups
com.ourcompany.foundation.zips
com.ourcompany.foundation.wars
com.ourcompany.foundation.services
We tried setting the group name at each place we added the artifacts but it seemed that the last group name in always won overriding the other group names.
Here is our core-portlet build.gradle. All of the work is done in the applied from gradle files
apply from: "$rootDir/gradle/liferay-service.gradle"
apply plugin: com.hewitt.gradle.plugins.LiferayPackagePlugin
dependencies {
...}
liferay-service.gradle
apply from : "$rootDir/gradle/liferay-polugin.gradle"
configurations {
serviceJar
}
artifacts {
serviceJar(servicesJar) {
group = 'com.ourcompany.foundation.services'
}
}
plugins.withId('java') {
dependencies {
compile files(tasks.servicesJar)
}
}
artifactoryPublish {
publishConfigs 'serviceJar'
}
LiferayPackagePlugin.groovy
project.artifacts {
group = 'com.ourcompany.foundation.zips'
archives project.tasks.packagePluginZip
// also tried this but the results were un changed
// archives(project.tasks.package.PluginZip) {
// group = 'com.ourcompany.foundation.zips'
// }
}