aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Poreda <jacek.poreda@sonarsource.com>2024-01-25 17:44:51 +0100
committersonartech <sonartech@sonarsource.com>2024-02-06 16:38:15 +0000
commit5e6ead969bb60559d9111a66399eaad5a11656bc (patch)
tree58ef5bd033b96c1c23b88e86a83fb3e838c0e791
parentf87b5668f3639a6fd9a2b26b1369989a55c2a810 (diff)
downloadsonarqube-5e6ead969bb60559d9111a66399eaad5a11656bc.tar.gz
sonarqube-5e6ead969bb60559d9111a66399eaad5a11656bc.zip
SONAR-21476 Enable JFrog authentication explicitly
-rw-r--r--build.gradle37
1 files changed, 15 insertions, 22 deletions
diff --git a/build.gradle b/build.gradle
index 5fa90e708d5..db4bea40eb9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -73,28 +73,21 @@ allprojects {
throw new GradleException('Invalid artifactoryUrl')
}
- if (artifactoryPassword) {
- if (artifactoryUrl == '') {
- throw new GradleException('Invalid artifactoryUrl')
- }
- maven {
- authentication {
- header(HttpHeaderAuthentication)
- }
- credentials(HttpHeaderCredentials) {
- name = "Authorization"
- value = "Bearer $artifactoryPassword"
+ maven {
+ if (artifactoryPassword) {
+ authentication {
+ header(HttpHeaderAuthentication)
+ }
+ credentials(HttpHeaderCredentials) {
+ name = "Authorization"
+ value = "Bearer $artifactoryPassword"
+ }
+ } else {
+ // Workaround for artifactory
+ // https://www.jfrog.com/jira/browse/RTFACT-13797
+ repository = 'public'
}
url "${artifactoryUrl}/${repository}"
- }
- } else {
- mavenCentral()
- maven {
- url 'https://jitpack.io'
- }
- maven {
- url 'https://maven.codelibs.org/'
- }
}
ivy {
if (artifactoryUsername && artifactoryPassword) {
@@ -548,10 +541,10 @@ subprojects {
pom {
name = 'SonarQube'
description = project.description
- url = 'http://www.sonarqube.org/'
+ url = 'https://www.sonarsource.com/products/sonarqube'
organization {
name = 'SonarSource'
- url = 'http://www.sonarsource.com'
+ url = 'https://www.sonarsource.com'
}
licenses {
license {