Due to a misbehavior in artifactory, the wrong http status code is returned and the build will stop immediately. This happens if you access a virtual repository which contains a repository which requires authentication.
As a workaround a virtual repository is used, which does not include non-public repositories.
https://www.jfrog.com/jira/browse/RTFACT-13797
repositories {
def repository = project.hasProperty('qa') ? 'sonarsource-qa' : 'sonarsource'
maven {
- url "https://repox.jfrog.io/repox/${repository}"
// The environment variables ARTIFACTORY_PRIVATE_USERNAME and ARTIFACTORY_PRIVATE_PASSWORD are used on QA env (Jenkins)
// On local box, please add artifactoryUsername and artifactoryPassword to ~/.gradle/gradle.properties
def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: (project.hasProperty('artifactoryUsername') ? project.getProperty('artifactoryUsername') : '')
username artifactoryUsername
password artifactoryPassword
}
+ } else {
+ // Workaround for artifactory
+ // https://www.jfrog.com/jira/browse/RTFACT-13797
+ repository = 'public'
}
+ url "https://repox.jfrog.io/repox/${repository}"
}
}