aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rautureau <david.rautureau@sonarsource.com>2018-04-04 14:39:44 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2018-04-04 14:39:44 +0200
commit81e92fa096160e36a82c8cd22e408cd1b374d8b8 (patch)
tree8f11c9a8c8dc1c2dcddd01b82f99ac39724509e2
parent4dec6ebfeef852905d9db4670757238f797c9d58 (diff)
downloadsonarqube-81e92fa096160e36a82c8cd22e408cd1b374d8b8.tar.gz
sonarqube-81e92fa096160e36a82c8cd22e408cd1b374d8b8.zip
Fix build
-rw-r--r--README.md6
-rw-r--r--build.gradle73
-rw-r--r--plugins/sonar-xoo-plugin/build.gradle4
-rw-r--r--server/sonar-db-core/build.gradle4
-rw-r--r--server/sonar-db-dao/build.gradle4
-rw-r--r--server/sonar-db-migration/build.gradle4
-rw-r--r--server/sonar-plugin-bridge/build.gradle4
-rw-r--r--server/sonar-process/build.gradle4
-rw-r--r--server/sonar-qa-util/build.gradle4
-rw-r--r--server/sonar-server/build.gradle4
-rw-r--r--server/sonar-web/build.gradle4
-rw-r--r--sonar-application/build.gradle8
-rw-r--r--sonar-core/build.gradle4
-rw-r--r--sonar-home/build.gradle4
-rw-r--r--sonar-markdown/build.gradle4
-rw-r--r--sonar-plugin-api/build.gradle8
-rw-r--r--sonar-scanner-engine/build.gradle4
-rw-r--r--sonar-scanner-protocol/build.gradle4
-rw-r--r--sonar-testing-harness/build.gradle4
-rw-r--r--sonar-ws/build.gradle4
-rwxr-xr-xtravis.sh68
21 files changed, 151 insertions, 76 deletions
diff --git a/README.md b/README.md
index 1b2e5eb9ac3..2c21927b6da 100644
--- 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:
diff --git a/build.gradle b/build.gradle
index c31cc34c13e..361a5609158 100644
--- a/build.gradle
+++ b/build.gradle
@@ -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 {
diff --git a/plugins/sonar-xoo-plugin/build.gradle b/plugins/sonar-xoo-plugin/build.gradle
index 66c6d051b68..df7a0be86c4 100644
--- a/plugins/sonar-xoo-plugin/build.gradle
+++ b/plugins/sonar-xoo-plugin/build.gradle
@@ -41,6 +41,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-db-core/build.gradle b/server/sonar-db-core/build.gradle
index df83a0aeaac..2548fbabbda 100644
--- a/server/sonar-db-core/build.gradle
+++ b/server/sonar-db-core/build.gradle
@@ -80,6 +80,10 @@ publishing {
artifact sourcesJar
artifact javadocJar
artifact testJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-db-dao/build.gradle b/server/sonar-db-dao/build.gradle
index f7103bceaae..b0b2503f626 100644
--- a/server/sonar-db-dao/build.gradle
+++ b/server/sonar-db-dao/build.gradle
@@ -59,6 +59,10 @@ publishing {
artifact sourcesJar
artifact javadocJar
artifact testJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-db-migration/build.gradle b/server/sonar-db-migration/build.gradle
index 7360daec774..b9adeee09cc 100644
--- a/server/sonar-db-migration/build.gradle
+++ b/server/sonar-db-migration/build.gradle
@@ -42,6 +42,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-plugin-bridge/build.gradle b/server/sonar-plugin-bridge/build.gradle
index d1fdaf049e8..0ca7127f75d 100644
--- a/server/sonar-plugin-bridge/build.gradle
+++ b/server/sonar-plugin-bridge/build.gradle
@@ -23,6 +23,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-process/build.gradle b/server/sonar-process/build.gradle
index 862d121f001..61a839aa320 100644
--- a/server/sonar-process/build.gradle
+++ b/server/sonar-process/build.gradle
@@ -38,6 +38,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-qa-util/build.gradle b/server/sonar-qa-util/build.gradle
index da6634f460c..2b65d26cbf6 100644
--- a/server/sonar-qa-util/build.gradle
+++ b/server/sonar-qa-util/build.gradle
@@ -25,6 +25,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-server/build.gradle b/server/sonar-server/build.gradle
index c88c09d48b3..f61d09ed382 100644
--- a/server/sonar-server/build.gradle
+++ b/server/sonar-server/build.gradle
@@ -102,6 +102,10 @@ publishing {
artifact sourcesJar
artifact javadocJar
artifact testJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle
index f7be5a3d07e..8a266b18ccd 100644
--- a/server/sonar-web/build.gradle
+++ b/server/sonar-web/build.gradle
@@ -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
diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle
index 80c95352ac8..f77f329a5f1 100644
--- a/sonar-application/build.gradle
+++ b/sonar-application/build.gradle
@@ -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
}
diff --git a/sonar-core/build.gradle b/sonar-core/build.gradle
index a2d0f1bb189..116afd59b8f 100644
--- a/sonar-core/build.gradle
+++ b/sonar-core/build.gradle
@@ -53,6 +53,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/sonar-home/build.gradle b/sonar-home/build.gradle
index c4323e91133..cc994082307 100644
--- a/sonar-home/build.gradle
+++ b/sonar-home/build.gradle
@@ -26,6 +26,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/sonar-markdown/build.gradle b/sonar-markdown/build.gradle
index ec958b2434c..abbb5f8f042 100644
--- a/sonar-markdown/build.gradle
+++ b/sonar-markdown/build.gradle
@@ -26,6 +26,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/sonar-plugin-api/build.gradle b/sonar-plugin-api/build.gradle
index af481d0d5ad..778dc84f88f 100644
--- a/sonar-plugin-api/build.gradle
+++ b/sonar-plugin-api/build.gradle
@@ -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
+ }
}
}
}
diff --git a/sonar-scanner-engine/build.gradle b/sonar-scanner-engine/build.gradle
index c7d662c821d..3970816b0d0 100644
--- a/sonar-scanner-engine/build.gradle
+++ b/sonar-scanner-engine/build.gradle
@@ -60,6 +60,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/sonar-scanner-protocol/build.gradle b/sonar-scanner-protocol/build.gradle
index 788ab75e8c4..999db37701b 100644
--- a/sonar-scanner-protocol/build.gradle
+++ b/sonar-scanner-protocol/build.gradle
@@ -31,6 +31,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/sonar-testing-harness/build.gradle b/sonar-testing-harness/build.gradle
index f6493bcca95..9cf1837d8f5 100644
--- a/sonar-testing-harness/build.gradle
+++ b/sonar-testing-harness/build.gradle
@@ -27,6 +27,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/sonar-ws/build.gradle b/sonar-ws/build.gradle
index 6f8aa851426..8b8f4c576e2 100644
--- a/sonar-ws/build.gradle
+++ b/sonar-ws/build.gradle
@@ -37,6 +37,10 @@ publishing {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
diff --git a/travis.sh b/travis.sh
index 60902db3ee3..fc9f821ca72 100755
--- 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)