Hello All,
I am new to gradle & artifactory.My idea is to maintain a backup in artifactory.
I have three version of Jars in artifactory (eg xyz-1.0.jar, xyz-2.0.jar & xyz-3.0.jar).
when I run gradle Publish I want to replace the Jars ( 3.0 to 2.0 & 2.0 to 1.0) and this new Publish will be 3.0.Jar.
Any ideas how we can ahieve this…
Here is my build.gradle
apply plugin: ‘java’
apply plugin: ‘eclipse’
apply plugin: ‘maven-publish’
apply plugin: ‘artifactory-publish’
groupId = ‘myGroup’
version = ‘1.0’
def artifactId = projectDir.name
def versionNumber = version
artifactory {
contextUrl = ‘http://path.to.artifactory’ // base artifactory url
publish {
repository {
repoKey = ‘libs-releases’ //The Artifactory repository key to publish to
username = ‘publisher’ //The publisher user name
password = ‘********’ //The publisher password
maven = true
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
defaults {
publications (‘mavenJava’)
}
artifactoryPublish {
dependsOn jar
}
Any help will be much appreciated
Arun