Only use artifactory task when user/pass exists

This commit is contained in:
Chris Bono
2022-07-09 18:37:38 -05:00
committed by GitHub
parent dc6cb011ad
commit fa606af64d

View File

@@ -364,16 +364,18 @@ sonarqube {
// skip publishing the root module
artifactoryPublish.skip = true
artifactory {
contextUrl = 'https://repo.spring.io'
publish {
repository {
repoKey = 'libs-snapshot-local'
username = "${artifactoryUsername}"
password = "${artifactoryPassword}"
}
defaults {
publications('mavenJava')
if (project.hasProperty('artifactoryUsername')) {
artifactory {
contextUrl = 'https://repo.spring.io'
publish {
repository {
repoKey = 'libs-snapshot-local'
username = "${artifactoryUsername}"
password = "${artifactoryPassword}"
}
defaults {
publications('mavenJava')
}
}
}
}