]> source.dussan.org Git - sonarqube.git/commitdiff
Fix build
authorDavid Rautureau <david.rautureau@sonarsource.com>
Wed, 4 Apr 2018 12:39:44 +0000 (14:39 +0200)
committerJanos Gyerik <janos.gyerik@sonarsource.com>
Wed, 4 Apr 2018 12:39:44 +0000 (14:39 +0200)
21 files changed:
README.md
build.gradle
plugins/sonar-xoo-plugin/build.gradle
server/sonar-db-core/build.gradle
server/sonar-db-dao/build.gradle
server/sonar-db-migration/build.gradle
server/sonar-plugin-bridge/build.gradle
server/sonar-process/build.gradle
server/sonar-qa-util/build.gradle
server/sonar-server/build.gradle
server/sonar-web/build.gradle
sonar-application/build.gradle
sonar-core/build.gradle
sonar-home/build.gradle
sonar-markdown/build.gradle
sonar-plugin-api/build.gradle
sonar-scanner-engine/build.gradle
sonar-scanner-protocol/build.gradle
sonar-testing-harness/build.gradle
sonar-ws/build.gradle
travis.sh

index 1b2e5eb9ac35d2cedc1600043be41e303897178a..2c21927b6dad38b5b26313df75c09e78b8ae6196 100644 (file)
--- a/README.md
+++ b/README.md
@@ -139,6 +139,12 @@ Here is a template example:
 The path to a custom configuration file can be provided with command-line property `-Dorchestrator.configUrl=file:///path/to/orchestrator.properties` or with
 environment variable `ORCHESTRATOR_CONFIG_URL=file:///path/to/orchestrator.properties`.
 
+### Find available updates of dependencies
+
+Execute from project base directory:
+
+    ./gradlew dependencyUpdates
+
 ### Update the files missing the license header
 
 Execute from project base directory:
index c31cc34c13e610595cafda24bc9b0deda54775ed..361a5609158b61837d0b57b857766fccd98e9076 100644 (file)
@@ -40,6 +40,79 @@ allprojects {
   ext {
     release = project.hasProperty('release') && project.getProperty('release')
     official = project.hasProperty('official') && project.getProperty('official')
+    pomConfig = {
+      name projectTitle
+      description description
+      url 'http://www.sonarqube.org/'
+      organization {
+        name 'SonarSource'
+        url 'http://www.sonarsource.com'
+      }
+      licenses {
+        license {
+          name 'GNU LGPL 3'
+          url 'http://www.gnu.org/licenses/lgpl.txt'
+          distribution 'repo'
+        }
+      }
+      scm {
+        url 'https://github.com/SonarSource/sonarqube'
+      }
+      developers {
+        developer {
+          id 'bellingard'
+          name 'Fabrice Bellingard'
+        }
+        developer {
+          id 'dbolkensteyn'
+          name 'Dinesh Bolkensteyn'
+        }
+        developer {
+          id 'ehartmann'
+          name 'Eric Hartmann'
+        }
+        developer {
+          id 'fmallet'
+          name 'Freddy Mallet'
+        }
+        developer {
+          id 'Godin'
+          name 'Evgeny Mandrikov'
+        }
+        developer {
+          id 'henryju'
+          name 'Julien Henry'
+        }
+        developer {
+          id 'jblievremont'
+          name 'Jean-Baptiste Lievremont'
+        }
+        developer {
+          id 'julienlancelot'
+          name 'Julien Lancelot'
+        }
+        developer {
+          id 'olivier.gaudin'
+          name 'Olivier Gaudin'
+        }
+        developer {
+          id 'simonbrandhof'
+          name 'Simon Brandhof'
+        }
+        developer {
+          id 'sns-seb'
+          name 'Sebastien Lesaint'
+        }
+        developer {
+          id 'stas-vilchik'
+          name 'Stas Vilchik'
+        }
+        developer {
+          id 'teryk'
+          name 'Teryk Bellahsene'
+        }
+      }
+    }
   }
 
   repositories {
index 66c6d051b68d21473705f2d47179c4c3a15f64e2..df7a0be86c4b332b9e4d48720f9ff5c498817579 100644 (file)
@@ -41,6 +41,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index df83a0aeaacf465f032b37abe964f4f85c2939e4..2548fbabbda8e385d5f33e8eace7b427f566189d 100644 (file)
@@ -80,6 +80,10 @@ publishing {
         artifact sourcesJar
         artifact javadocJar
         artifact testJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index f7103bceaae99fe5fe9b73fecf0a4fdd02d2557b..b0b2503f626fd2c331b4d6a645111cb8c3b754f6 100644 (file)
@@ -59,6 +59,10 @@ publishing {
         artifact sourcesJar
         artifact javadocJar
         artifact testJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index 7360daec774288c8127b47a9593a772cd241be3c..b9adeee09cc780bce62e2239694426e482940a07 100644 (file)
@@ -42,6 +42,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index d1fdaf049e87c8f1087728d63072143d3f88bcc5..0ca7127f75dd75757cb7b600a9e3358ad0ba8f7f 100644 (file)
@@ -23,6 +23,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index 862d121f0017d2eaebbf461a488fbde8cceda772..61a839aa3204248041258a1513f85e8250410720 100644 (file)
@@ -38,6 +38,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index da6634f460cc5e59985e3cf340c4555b091d4f91..2b65d26cbf6a0917b320053f41bd897061b90073 100644 (file)
@@ -25,6 +25,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index c88c09d48b3c8ca05f9b16333d107bdd3074f33b..f61d09ed3822f10e21ebb9eda16725778ced5747 100644 (file)
@@ -102,6 +102,10 @@ publishing {
         artifact sourcesJar
         artifact javadocJar
         artifact testJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index f7be5a3d07ec8aa4fc649392ffc58d7b73b224a4..8a266b18ccd7287e934b7765beb7883f6604b781 100644 (file)
@@ -74,12 +74,12 @@ def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "c
 
 task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
   source = sources
-  if (release) exclude 'main/js/app/components/GlobalFooterBranding.js'
+  if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
 }
 licenseMain.dependsOn licenseCheckWeb
 
 task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
   source = sources
-  if (release) exclude 'main/js/app/components/GlobalFooterBranding.js'
+  if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
 }
 licenseFormat.dependsOn licenseFormatWeb
index 80c95352ac8907cb2f0403e521eaa172f9ebe5c4..f77f329a5f127c3bd91282406712f6a45233eae9 100644 (file)
@@ -153,9 +153,11 @@ artifactoryPublish.skip = false
 publishing {
   publications {
     mavenJava(MavenPublication) {
-      pom.withXml {
-        asNode().appendNode('description', description)
-        asNode().children().last() + pomConfig
+      if (release) {
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
       artifact zip
     }
index a2d0f1bb1892198f2c7a565caf962b9069bc54db..116afd59b8f18c6816f0839e20877788c7ee7326 100644 (file)
@@ -53,6 +53,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index c4323e91133c5b4fd9656f4e3d24a1d0a54420f7..cc994082307d8165c558d18969d83d730465471b 100644 (file)
@@ -26,6 +26,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index ec958b2434c18b9f229ca1cab6f98bed20684c8d..abbb5f8f042fde10ad349f2006bb3f42ecc65ead 100644 (file)
@@ -26,6 +26,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index af481d0d5ad1eaff8bf657a49d0cc66e148fbbe2..778dc84f88f788b3577b48f66f61c3896e6cde10 100644 (file)
@@ -74,14 +74,14 @@ artifactoryPublish.skip = false
 publishing {
   publications {
     mavenJava(MavenPublication) {
-      pom.withXml {
-        asNode().appendNode('description', description)
-        asNode().children().last() + pomConfig
-      }
       artifact source: shadowJar, classifier: null
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index c7d662c821d39a8543e3585ea0111eb1a42b4cde..3970816b0d0a08e5fef40cf1ac2c1a5d37e0cf24 100644 (file)
@@ -60,6 +60,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index 788ab75e8c48dcd1a24da0964d394da2ca26bf66..999db37701b935340de964aedac3ecbc6452069d 100644 (file)
@@ -31,6 +31,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index f6493bcca95ca4ae78d8d879c8813e2f07b285a6..9cf1837d8f54dfb9ffcb15d49c8565e58acebc97 100644 (file)
@@ -27,6 +27,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index 6f8aa85142673ca613fd5f8f099ac13dd163ef44..8b8f4c576e26266c0931034205ce7aa440fca9f0 100644 (file)
@@ -37,6 +37,10 @@ publishing {
       if (release) {
         artifact sourcesJar
         artifact javadocJar
+        pom.withXml {
+          asNode().appendNode('description', description)
+          asNode().children().last() + pomConfig
+        }
       }
     }
   }
index 60902db3ee34ed3a65333892aba04c3147bf4cba..fc9f821ca72d570bfcbc63a8ea766556619cb656 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -56,73 +56,7 @@ case "$TARGET" in
 
 BUILD)
   installJdk8
-  installNode
-
-  # Used by Next
-  export INITIAL_VERSION=$(cat gradle.properties | grep version | awk -F= '{print $2}')
-
-  # Fetch all commit history so that SonarQube has exact blame information
-  # for issue auto-assignment
-  # This command can fail with "fatal: --unshallow on a complete repository does not make sense"
-  # if there are not enough commits in the Git repository (even if Travis executed git clone --depth 50).
-  # For this reason errors are ignored with "|| true"
-  git fetch --unshallow || true
-
-  if [ "$TRAVIS_REPO_SLUG" == "SonarSource/sonarqube" ]; then
-    # public repository
-    ./gradlew build --no-daemon --console plain
-
-  elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
-    echo 'Build and analyze master'
-    ./gradlew --no-daemon --console plain \
-        -DbuildNumber=$BUILD_NUMBER \
-        build sonarqube artifactoryPublish -PjacocoEnabled=true -Pofficial=true -Prelease=true \
-        -Dsonar.host.url=$SONAR_HOST_URL \
-        -Dsonar.login=$SONAR_TOKEN \
-        -Dsonar.projectVersion=$INITIAL_VERSION \
-        -Dsonar.analysis.buildNumber=$BUILD_NUMBER \
-        -Dsonar.analysis.pipeline=$BUILD_NUMBER \
-        -Dsonar.analysis.sha1=$GIT_COMMIT \
-        -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
-
-  elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
-    echo 'Build release branch'
-    ./gradlew --no-daemon --console plain \
-        -DbuildNumber=$BUILD_NUMBER \
-        build sonarqube artifactoryPublish -PjacocoEnabled=true -Pofficial=true -Prelease=true \
-        -Dsonar.host.url=$SONAR_HOST_URL \
-        -Dsonar.login=$SONAR_TOKEN \
-        -Dsonar.branch.name=$TRAVIS_BRANCH \
-        -Dsonar.projectVersion=$INITIAL_VERSION \
-        -Dsonar.analysis.buildNumber=$BUILD_NUMBER \
-        -Dsonar.analysis.pipeline=$BUILD_NUMBER \
-        -Dsonar.analysis.sha1=$GIT_COMMIT \
-        -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
-  
-  elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
-    echo 'Build and analyze internal pull request'
-    ./gradlew --no-daemon --console plain \
-        -DbuildNumber=$BUILD_NUMBER \
-        build sonarqube artifactoryPublish -PjacocoEnabled=true -Pofficial=true \
-        -Dsonar.host.url=$SONAR_HOST_URL \
-        -Dsonar.login=$SONAR_TOKEN \
-        -Dsonar.analysis.buildNumber=$BUILD_NUMBER \
-        -Dsonar.analysis.pipeline=$BUILD_NUMBER \
-        -Dsonar.analysis.sha1=$TRAVIS_PULL_REQUEST_SHA \
-        -Dsonar.analysis.prNumber=$TRAVIS_PULL_REQUEST \
-        -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG \
-        -Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST \
-        -Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH \
-        -Dsonar.pullrequest.base=$TRAVIS_BRANCH \
-        -Dsonar.pullrequest.provider=github \
-        -Dsonar.pullrequest.github.repository=$TRAVIS_REPO_SLUG
-
-  else
-    echo 'Build feature branch or external pull request'
-    ./gradlew  --no-daemon --console plain \
-        -DbuildNumber=$BUILD_NUMBER -Pofficial=true \
-        build artifactoryPublish
-  fi
+  ./gradlew build --no-daemon --console plain
   ;;
 
 WEB_TESTS)