]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21476 Enable JFrog authentication explicitly
authorJacek Poreda <jacek.poreda@sonarsource.com>
Thu, 25 Jan 2024 16:44:51 +0000 (17:44 +0100)
committersonartech <sonartech@sonarsource.com>
Tue, 6 Feb 2024 16:38:15 +0000 (16:38 +0000)
build.gradle

index 5fa90e708d50a71dfb2a1c51a6913fb2290b1355..db4bea40eb9a266029cde3f405c46d43c25be6c7 100644 (file)
@@ -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 {