aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rautureau <david.rautureau@sonarsource.com>2018-02-08 15:01:19 +0100
committerDavid Rautureau <david.rautureau@sonarsource.com>2018-03-09 11:33:38 +0100
commit1a17e4302e4b63de6b4ce7c049441803b9471524 (patch)
tree031bcfbf302c7909c5b45a7c31f1bbc00a2fce34
parent21fbe3697bdb6e66016ef8d0bea49da574e02e7d (diff)
downloadsonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.tar.gz
sonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.zip
Move To Gradle
-rw-r--r--.gitignore7
-rw-r--r--.travis.yml13
-rw-r--r--build.gradle296
-rwxr-xr-xbuild.sh4
-rwxr-xr-xcix.sh68
-rw-r--r--cve-false-positives.xml17
-rwxr-xr-xfind-classpath-conflicts.sh7
-rwxr-xr-xformat-headers.sh4
-rw-r--r--gradle.properties4
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin0 -> 54333 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties5
-rwxr-xr-xgradlew172
-rw-r--r--gradlew.bat84
-rw-r--r--plugins/build.gradle3
-rw-r--r--plugins/sonar-xoo-plugin/build.gradle44
-rw-r--r--plugins/sonar-xoo-plugin/pom.xml75
-rw-r--r--pom.xml1554
-rwxr-xr-xquick-build.sh44
-rwxr-xr-xrun-db-unit-tests.sh10
-rwxr-xr-xrun-integration-tests.sh12
-rwxr-xr-xrun-perf-tests.sh7
-rwxr-xr-xrun-upgrade-tests.sh8
-rwxr-xr-xscripts/logs.sh2
-rwxr-xr-xscripts/start.sh6
-rw-r--r--server/build.gradle5
-rw-r--r--server/pom.xml59
-rw-r--r--server/sonar-ce/build.gradle24
-rw-r--r--server/sonar-ce/pom.xml68
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java6
-rw-r--r--server/sonar-db-core/build.gradle71
-rw-r--r--server/sonar-db-core/pom.xml197
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java49
-rw-r--r--server/sonar-db-dao/build.gradle51
-rw-r--r--server/sonar-db-dao/pom.xml109
-rw-r--r--server/sonar-db-migration/build.gradle42
-rw-r--r--server/sonar-db-migration/pom.xml76
-rw-r--r--server/sonar-db-testing/build.gradle15
-rw-r--r--server/sonar-db-testing/pom.xml46
-rw-r--r--server/sonar-main/build.gradle30
-rw-r--r--server/sonar-main/pom.xml120
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java7
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java16
-rw-r--r--server/sonar-plugin-bridge/build.gradle27
-rw-r--r--server/sonar-plugin-bridge/pom.xml29
-rw-r--r--server/sonar-process/build.gradle49
-rw-r--r--server/sonar-process/pom.xml96
-rw-r--r--server/sonar-qa-util/build.gradle29
-rw-r--r--server/sonar-qa-util/pom.xml51
-rw-r--r--server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/SelenideConfig.java2
-rw-r--r--server/sonar-server/build.gradle96
-rw-r--r--server/sonar-server/pom.xml344
-rw-r--r--server/sonar-server/src/main/java/org/sonar/ce/log/CeLogging.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/app/EmbeddedTomcat.java1
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/es/EsClientProvider.java3
-rw-r--r--server/sonar-web/build.gradle44
-rw-r--r--server/sonar-web/pom.xml256
-rw-r--r--settings.gradle61
-rw-r--r--sonar-application/assembly-common.xml19
-rw-r--r--sonar-application/assembly.xml213
-rw-r--r--sonar-application/build.gradle148
-rw-r--r--sonar-application/pom.xml271
-rw-r--r--sonar-application/src/main/assembly/logs/README.txt1
-rw-r--r--sonar-check-api/build.gradle11
-rw-r--r--sonar-check-api/pom.xml26
-rw-r--r--sonar-core/build.gradle53
-rw-r--r--sonar-core/pom.xml166
-rw-r--r--sonar-duplications/build.gradle18
-rw-r--r--sonar-duplications/pom.xml73
-rw-r--r--sonar-home/build.gradle28
-rw-r--r--sonar-home/pom.xml52
-rw-r--r--sonar-markdown/build.gradle28
-rw-r--r--sonar-markdown/pom.xml44
-rw-r--r--sonar-plugin-api-deps/build.gradle39
-rw-r--r--sonar-plugin-api-deps/pom.xml231
-rw-r--r--sonar-plugin-api/build.gradle82
-rw-r--r--sonar-plugin-api/pom.xml282
-rw-r--r--sonar-plugin-api/src/main/resources/sonar-api-version.txt2
-rw-r--r--sonar-plugin-api/src/main/resources/sq-version.txt2
-rw-r--r--sonar-scanner-engine-shaded/build.gradle11
-rw-r--r--sonar-scanner-engine-shaded/pom.xml65
-rw-r--r--sonar-scanner-engine/build.gradle63
-rw-r--r--sonar-scanner-engine/pom.xml165
-rw-r--r--sonar-scanner-protocol/build.gradle34
-rw-r--r--sonar-scanner-protocol/pom.xml104
-rw-r--r--sonar-testing-harness/build.gradle29
-rw-r--r--sonar-testing-harness/pom.xml47
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java2
-rw-r--r--sonar-ws-generator/build.gradle23
-rw-r--r--sonar-ws-generator/pom.xml88
-rwxr-xr-xsonar-ws-generator/run.sh10
-rw-r--r--sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java9
-rw-r--r--sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/Helper.java2
-rw-r--r--sonar-ws/build.gradle39
-rw-r--r--sonar-ws/pom.xml82
-rwxr-xr-xstop.sh2
-rw-r--r--tests/build.gradle149
-rw-r--r--tests/plugins/access-secured-props-plugin/build.gradle19
-rw-r--r--tests/plugins/access-secured-props-plugin/pom.xml38
-rw-r--r--tests/plugins/backdating-customplugin/build.gradle31
-rw-r--r--tests/plugins/backdating-customplugin/pom.xml82
-rw-r--r--tests/plugins/backdating-plugin-v1/build.gradle29
-rw-r--r--tests/plugins/backdating-plugin-v1/pom.xml75
-rw-r--r--tests/plugins/backdating-plugin-v2/build.gradle29
-rw-r--r--tests/plugins/backdating-plugin-v2/pom.xml75
-rw-r--r--tests/plugins/base-auth-plugin/build.gradle25
-rw-r--r--tests/plugins/base-auth-plugin/pom.xml57
-rw-r--r--tests/plugins/batch-plugin/build.gradle18
-rw-r--r--tests/plugins/batch-plugin/pom.xml37
-rw-r--r--tests/plugins/extension-lifecycle-plugin/build.gradle18
-rw-r--r--tests/plugins/extension-lifecycle-plugin/pom.xml36
-rw-r--r--tests/plugins/fake-billing-plugin/build.gradle19
-rw-r--r--tests/plugins/fake-billing-plugin/pom.xml44
-rw-r--r--tests/plugins/fake-governance-plugin/build.gradle19
-rw-r--r--tests/plugins/fake-governance-plugin/pom.xml44
-rw-r--r--tests/plugins/foo-plugin-v1/build.gradle29
-rw-r--r--tests/plugins/foo-plugin-v1/pom.xml75
-rw-r--r--tests/plugins/foo-plugin-v2/build.gradle29
-rw-r--r--tests/plugins/foo-plugin-v2/pom.xml75
-rw-r--r--tests/plugins/global-property-change-plugin/build.gradle18
-rw-r--r--tests/plugins/global-property-change-plugin/pom.xml39
-rw-r--r--tests/plugins/issue-filter-plugin/build.gradle18
-rw-r--r--tests/plugins/issue-filter-plugin/pom.xml39
-rw-r--r--tests/plugins/l10n-fr-pack/build.gradle18
-rw-r--r--tests/plugins/l10n-fr-pack/pom.xml52
-rw-r--r--tests/plugins/license-plugin/build.gradle18
-rw-r--r--tests/plugins/license-plugin/pom.xml38
-rw-r--r--tests/plugins/oauth2-auth-plugin/build.gradle18
-rw-r--r--tests/plugins/oauth2-auth-plugin/pom.xml45
-rw-r--r--tests/plugins/pom.xml69
-rw-r--r--tests/plugins/posttask-plugin/build.gradle18
-rw-r--r--tests/plugins/posttask-plugin/pom.xml39
-rw-r--r--tests/plugins/project-builder-plugin/build.gradle18
-rw-r--r--tests/plugins/project-builder-plugin/pom.xml36
-rw-r--r--tests/plugins/property-relocation-plugin/build.gradle18
-rw-r--r--tests/plugins/property-relocation-plugin/pom.xml39
-rw-r--r--tests/plugins/property-sets-plugin/build.gradle18
-rw-r--r--tests/plugins/property-sets-plugin/pom.xml42
-rw-r--r--tests/plugins/security-plugin/build.gradle29
-rw-r--r--tests/plugins/security-plugin/pom.xml59
-rw-r--r--tests/plugins/server-plugin/build.gradle18
-rw-r--r--tests/plugins/server-plugin/pom.xml39
-rw-r--r--tests/plugins/settings-encryption-plugin/build.gradle18
-rw-r--r--tests/plugins/settings-encryption-plugin/pom.xml36
-rw-r--r--tests/plugins/settings-plugin/build.gradle18
-rw-r--r--tests/plugins/settings-plugin/pom.xml40
-rw-r--r--tests/plugins/sonar-fake-plugin/build.gradle19
-rw-r--r--tests/plugins/sonar-fake-plugin/pom.xml40
-rw-r--r--tests/plugins/sonar-subcategories-plugin/build.gradle18
-rw-r--r--tests/plugins/sonar-subcategories-plugin/pom.xml58
-rw-r--r--tests/plugins/ui-extensions-plugin/build.gradle18
-rw-r--r--tests/plugins/ui-extensions-plugin/pom.xml39
-rw-r--r--tests/plugins/wait-at-platform-level4-plugin/build.gradle18
-rw-r--r--tests/plugins/wait-at-platform-level4-plugin/pom.xml51
-rw-r--r--tests/plugins/ws-plugin/build.gradle22
-rw-r--r--tests/plugins/ws-plugin/pom.xml43
-rw-r--r--tests/pom.xml282
-rw-r--r--tests/src/test/java/org/sonarqube/tests/Byteman.java9
-rw-r--r--tests/src/test/java/org/sonarqube/tests/Category1Suite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/Category3Suite.java7
-rw-r--r--tests/src/test/java/org/sonarqube/tests/Category4Suite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/Category6Suite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/analysis/AnalysisEsResilienceTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/authorization/AuthorizationSuite.java8
-rw-r--r--tests/src/test/java/org/sonarqube/tests/ce/CeShutdownTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/ce/CeWorkersTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/component/ComponentSuite.java5
-rw-r--r--tests/src/test/java/org/sonarqube/tests/duplication/DuplicationSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/issue/IssueCreationDatePluginChangedTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/issue/IssueSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssueSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/lite/LiteTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/marketplace/UpdateCenterTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/measure/MeasureSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/organization/OrganizationSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/performance/scanner/ScannerPerformanceSuite.java8
-rw-r--r--tests/src/test/java/org/sonarqube/tests/performance/server/ComputeEnginePerfTest.java8
-rw-r--r--tests/src/test/java/org/sonarqube/tests/performance/server/ServerPerfTest.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/plugins/CompressPluginsTest.java4
-rw-r--r--tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java7
-rw-r--r--tests/src/test/java/org/sonarqube/tests/project/ProjectSuite.java5
-rw-r--r--tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectSuite.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/qualityModel/QualityModelSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/qualityProfile/ActiveRuleEsResilienceTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java7
-rw-r--r--tests/src/test/java/org/sonarqube/tests/rule/RuleEsResilienceTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/rule/RuleReKeyingTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/serverSystem/RestartTest.java4
-rw-r--r--tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemRestartingOrchestrator.java9
-rw-r--r--tests/src/test/java/org/sonarqube/tests/serverSystem/SystemStateTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/settings/SettingsTestRestartingOrchestrator.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/source/SourceSuite.java5
-rw-r--r--tests/src/test/java/org/sonarqube/tests/startup/StartupIndexationTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java5
-rw-r--r--tests/src/test/java/org/sonarqube/tests/test/TestSuite.java6
-rw-r--r--tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java15
-rw-r--r--tests/src/test/java/org/sonarqube/tests/user/OnboardingTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/user/RealmAuthenticationTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/user/SsoAuthenticationTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/user/UserEsResilienceTest.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/user/UserSuite.java3
-rw-r--r--tests/src/test/java/org/sonarqube/tests/webhook/WebhooksSuite.java3
-rw-r--r--tests/src/test/java/util/ItUtils.java21
-rwxr-xr-xthird-party-licenses.sh4
-rwxr-xr-xtravis.sh126
207 files changed, 2804 insertions, 7202 deletions
diff --git a/.gitignore b/.gitignore
index fadc2446785..80ca88f2fc1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,14 +7,13 @@ server/sonar-web/src/main/webapp/WEB-INF/log/
server/sonar-web/src/main/webapp/deploy/*.jar
server/sonar-web/src/main/webapp/deploy/jdbc-driver.txt
+# ---- Gradle
+build/
+.gradle/
# ---- Javadoc
docs.tar
-# ---- Maven
-target/
-dependency-reduced-pom.xml
-
# ---- IntelliJ IDEA
*.iws
*.iml
diff --git a/.travis.yml b/.travis.yml
index 960ab66f8d7..1b1eb237819 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,17 +14,16 @@ matrix:
cache:
directories:
- - $HOME/.m2/repository
- $HOME/.sonar
- - server/sonar-web/node
- - server/sonar-web/node_modules
- $HOME/jvm
- - $HOME/maven
+ - $HOME/.gradle/caches/
+ - $HOME/.gradle/wrapper/
before_cache:
- # remove all the artifacts (JAR, ZIP) that are installed in local repo because of mvn deploy
- - rm -rf $HOME/.m2/repository/org/sonarsource/sonarqube
- - find $HOME/.m2 -name resolver-status.properties -exec rm {} \;
+ - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
+ - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
+ - rm -fr $HOME/.gradle/caches/*/fileHashes/
+ - rm -fr $HOME/.gradle/caches/*/scripts/
notifications:
email: false
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 00000000000..4ba10851def
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,296 @@
+buildscript {
+ repositories {
+ maven {
+ url 'https://plugins.gradle.org/m2/'
+ }
+ }
+ dependencies {
+ // check updates with https://plugins.gradle.org/
+ // Ordered alphabeticly to avoid duplication
+ classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
+ classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.4'
+ classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0'
+ classpath 'io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE'
+ classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.6.2'
+ classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2'
+ }
+}
+
+// Analyze SonarQube with SonarQube!
+apply plugin: 'org.sonarqube'
+sonarqube {
+ properties {
+ property 'sonar.projectName', projectTitle
+ }
+}
+
+allprojects {
+ apply plugin: 'com.jfrog.artifactory'
+ apply plugin: 'maven-publish'
+
+ // Replaces the version defined in sources, usually x.y-SNAPSHOT, by a version identifying the build.
+ def buildNumber = System.getProperty("buildNumber")
+ if (version.endsWith('-SNAPSHOT') && buildNumber != null) {
+ version = version.replace('-SNAPSHOT', ".0.$buildNumber")
+ }
+
+ ext {
+ release = project.hasProperty('release') && project.getProperty('release')
+ }
+
+ repositories {
+ def repository = project.hasProperty('cix') ? 'sonarsource-qa' : 'sonarsource'
+ maven {
+ url "https://repox.sonarsource.com/${repository}"
+ def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME'
+ def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD'
+ if (artifactoryUsername && artifactoryPassword) {
+ credentials {
+ username artifactoryUsername
+ password artifactoryPassword
+ }
+ }
+ }
+ }
+}
+
+subprojects {
+ apply plugin: 'io.spring.dependency-management'
+ apply plugin: 'java'
+ // protobuf must be applied after java
+ apply plugin: 'com.google.protobuf'
+ apply plugin: "jacoco"
+ apply plugin: 'idea'
+
+ // do not deploy to Artifactory by default
+ artifactoryPublish.skip = true
+
+ ext {
+ elasticsearchVersion = '5.6.3'
+ protobufVersion = '3.5.1'
+ }
+
+ sonarqube {
+ properties {
+ property 'sonar.moduleKey', project.group + ':' + project.name
+ }
+ }
+
+ // Central place for definition dependency versions and exclusions.
+ dependencyManagement {
+ dependencies {
+ // please keep this list alphabetically ordered
+ dependencySet(group: 'ch.qos.logback', version: '1.2.3') {
+ entry 'logback-access'
+ entry 'logback-classic'
+ entry 'logback-core'
+ }
+ dependency('commons-beanutils:commons-beanutils:1.8.3') {
+ exclude 'commons-logging:commons-logging'
+ }
+ dependency 'commons-codec:commons-codec:1.8'
+ dependency 'commons-dbcp:commons-dbcp:1.4'
+ dependency 'commons-dbutils:commons-dbutils:1.5'
+ dependency 'commons-io:commons-io:2.4'
+ dependency 'commons-lang:commons-lang:2.6'
+ dependencySet(group: 'com.fasterxml.jackson.core', version: '2.6.6') {
+ entry 'jackson-core'
+ entry 'jackson-databind'
+ entry 'jackson-annotations'
+ }
+ dependency 'com.github.kevinsawicki:http-request:5.4.1'
+ dependency 'com.github.tlrx:elasticsearch-test:1.2.1'
+ dependency 'com.googlecode.java-diff-utils:diffutils:1.2'
+ dependency('com.googlecode.json-simple:json-simple:1.1.1') {
+ exclude 'junit:junit'
+ }
+ dependency 'com.google.code.findbugs:jsr305:3.0.2'
+ dependency 'com.google.code.gson:gson:2.3.1'
+ dependency 'com.google.guava:guava:18.0'
+ dependency "com.google.protobuf:protobuf-java:${protobufVersion}"
+ dependency 'com.h2database:h2:1.3.176'
+ dependencySet(group: 'com.hazelcast', version: '3.8.6') {
+ entry 'hazelcast'
+ entry 'hazelcast-client'
+ }
+ dependency 'com.ibm.icu:icu4j:3.4.4'
+ dependency 'com.microsoft.sqlserver:mssql-jdbc:6.2.2.jre8'
+ dependency 'com.oracle.jdbc:ojdbc8:12.2.0.1.0'
+ dependencySet(group: 'com.squareup.okhttp3', version: '3.7.0') {
+ entry 'okhttp'
+ entry 'mockwebserver'
+ }
+ dependency 'com.tngtech.java:junit-dataprovider:1.9.2'
+ dependency 'io.jsonwebtoken:jjwt:0.9.0'
+ dependency 'javax.servlet:javax.servlet-api:3.0.1'
+ dependency 'javax.xml.bind:jaxb-api:2.3.0'
+ dependency 'junit:junit:4.12'
+ dependency 'mysql:mysql-connector-java:5.1.42'
+ dependency 'net.jpountz.lz4:lz4:1.3.0'
+ dependency 'org.apache.commons:commons-csv:1.4'
+ dependency 'org.apache.commons:commons-email:1.5'
+ dependency('org.apache.httpcomponents:httpclient:4.5.2'){
+ exclude 'commons-logging:commons-logging'
+ }
+ // Be aware that Log4j is used by Elasticsearch client
+ dependencySet(group: 'org.apache.logging.log4j', version: '2.8.2') {
+ entry 'log4j-api'
+ entry 'log4j-to-slf4j'
+ entry 'log4j-core'
+ }
+ dependencySet(group: 'org.apache.tomcat.embed', version: '8.5.23') {
+ entry 'tomcat-embed-core'
+ entry('tomcat-embed-jasper') {
+ exclude 'org.eclipse.jdt.core.compiler:ecj'
+ }
+ }
+ dependency 'org.assertj:assertj-core:3.9.0'
+ dependency 'org.assertj:assertj-guava:3.1.0'
+ dependency('org.codehaus.sonar:sonar-channel:4.1') {
+ exclude 'org.slf4j:slf4j-api'
+ }
+ dependency 'org.codehaus.sonar:sonar-classloader:1.0'
+ dependency('org.codehaus.woodstox:woodstox-core-lgpl:4.4.0') {
+ exclude 'javax.xml.stream:stax-api'
+ }
+ dependency 'org.codehaus.sonar.runner:sonar-runner-api:2.4'
+ dependency('org.codehaus.sonar:sonar-squid:4.1') {
+ exclude 'org.codehaus.sonar:sonar-check-api'
+ }
+ dependency('org.codehaus.staxmate:staxmate:2.0.1') {
+ exclude 'org.codehaus.woodstox:stax2-api'
+ exclude 'stax:stax-api'
+ exclude 'org.codehaus.woodstox:woodstox-core-asl'
+ }
+ dependency('org.codehaus.woodstox:stax2-api:3.1.4') {
+ exclude 'stax:stax-api'
+ }
+ dependency('org.dbunit:dbunit:2.4.5') {
+ exclude 'commons-lang:commons-lang'
+ exclude 'xerces:xmlParserAPIs'
+ exclude 'xerces:xercesImpl'
+ }
+ dependency 'org.eclipse.jetty:jetty-server:8.1.12.v20130726'
+ dependency 'org.eclipse.jetty:test-jetty-servlet:8.1.12.v20130726'
+ dependency("org.elasticsearch.client:transport:${elasticsearchVersion}") {
+ exclude 'org.elasticsearch.plugin:lang-mustache-client'
+ exclude 'org.elasticsearch.plugin:transport-netty3-client'
+ exclude 'commons-logging:commons-logging'
+ exclude 'org.elasticsearch.plugin:reindex-client'
+ }
+ dependency 'org.freemarker:freemarker:2.3.20'
+ dependency 'org.hamcrest:hamcrest-all:1.3'
+ dependency('org.mockito:mockito-core:2.13.0') {
+ exclude 'org.hamcrest:hamcrest-core'
+ }
+ dependency 'org.mybatis:mybatis:3.4.4'
+ dependency 'org.nanohttpd:nanohttpd:2.3.0'
+ dependency 'org.picocontainer:picocontainer:2.15'
+ dependencySet(group: 'org.slf4j', version: '1.7.25') {
+ entry 'slf4j-api'
+ entry 'jul-to-slf4j'
+ entry 'log4j-over-slf4j'
+ }
+ dependency 'org.postgresql:postgresql:42.2.1'
+ dependency 'org.reflections:reflections:0.9.9'
+ dependency 'org.simpleframework:simple:4.1.21'
+ dependency 'org.sonarsource.orchestrator:sonar-orchestrator:3.16.1.1446'
+ dependency('org.sonarsource:sonar-persistit:3.3.2') {
+ exclude 'commons-logging:commons-logging'
+ }
+ dependency 'org.sonarsource.update-center:sonar-update-center-common:1.18.0.487'
+ dependency 'org.subethamail:subethasmtp:3.1.7'
+ dependency 'xml-apis:xml-apis:1.4.01'
+
+ // please keep this list alphabetically ordered
+ }
+ }
+
+ sourceCompatibility = 1.8
+ tasks.withType(JavaCompile) {
+ options.encoding = 'UTF-8'
+ }
+
+ tasks.withType(Javadoc) {
+ options.addStringOption('Xdoclint:none', '-quiet')
+ }
+
+ task sourcesJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+ }
+
+ task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+ }
+
+ test {
+ systemProperty 'java.awt.headless', true
+ jacoco.enabled = project.hasProperty('jacocoEnabled')
+ testLogging {
+ exceptionFormat 'full' // log the full stack trace (default is the 1st line of the stack trace)
+ events "skipped", "failed" // verbose log for failed and skipped tests (by default the name of the tests are not logged)
+ }
+ }
+
+ def protoMainSrc = 'src/main/protobuf'
+ def protoTestSrc = 'src/test/protobuf'
+ if (file(protoMainSrc).exists() || file(protoTestSrc).exists()) {
+ sourceSets.main.proto.srcDir protoMainSrc // in addition to the default 'src/main/proto'
+ sourceSets.test.proto.srcDir protoTestSrc // in addition to the default 'src/test/proto'
+ protobuf {
+ protoc {
+ artifact = "com.google.protobuf:protoc:${protobufVersion}"
+ }
+ }
+ idea {
+ module {
+ sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java")
+ testSourceDirs += file("${protobuf.generatedFilesBaseDir}/test/java")
+ }
+ }
+ }
+
+ if (release) {
+ jar {
+ // do not break incremental build on non-release versions
+ manifest {
+ attributes(
+ 'Version': "${version}",
+ 'Implementation-Build': 'git rev-parse HEAD'.execute().text.trim(),
+ 'Build-Time': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
+ )
+ }
+ }
+ }
+}
+
+artifactory {
+ clientConfig.setIncludeEnvVars(true)
+ clientConfig.setEnvVarsExcludePatterns('*password*,*PASSWORD*,*secret*,*MAVEN_CMD_LINE_ARGS*,sun.java.command,*token*,*TOKEN*,*LOGIN*,*login*')
+ contextUrl = System.getenv('ARTIFACTORY_URL')
+ publish {
+ repository {
+ repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO')
+ username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME')
+ password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD')
+ }
+ defaults {
+ properties = [
+ 'vcs.revision': System.getenv('GIT_COMMIT'),
+ 'vcs.branch': System.getenv('GIT_BRANCH'),
+ 'build.name': 'sonarqube',
+ 'build.number': (System.getenv('BUILD_ID') ?: System.getenv('BUILD_NUMBER'))
+ ]
+ publications('mavenJava')
+ publishPom = true
+ publishIvy = false
+ }
+ }
+ clientConfig.info.setBuildNumber(System.getenv('BUILD_NUMBER'))
+ // Define the artifacts to be deployed to https://sonarsource.bintray.com on releases
+ clientConfig.info.addEnvironmentProperty('ARTIFACTS_TO_PUBLISH', "${project.group}:sonar-application:zip")
+ // The name of this variable is important because it's used by the delivery process when extracting version from Artifactory build info.
+ clientConfig.info.addEnvironmentProperty('PROJECT_VERSION', "${version}")
+}
diff --git a/build.sh b/build.sh
index 47bc89e9e2b..91b40fb5166 100755
--- a/build.sh
+++ b/build.sh
@@ -2,6 +2,4 @@
./stop.sh
-# Parallel executions of maven modules and tests.
-# Half of CPU core are used in to keep other half for OS and other programs.
-mvn clean install -e -B -T0.5C -DforkCount=0.5C $*
+./gradlew build $*
diff --git a/cix.sh b/cix.sh
index a6d4f3a2491..51d388eaab0 100755
--- a/cix.sh
+++ b/cix.sh
@@ -3,16 +3,20 @@
set -euo pipefail
+REPOX_ARGS="-Dorchestrator.artifactory.apiKey=$REPOX_API_KEY -Dorchestrator.artifactory.repositories=sonarsource-qa"
+TEST_ARGS="-Pcix=true -DbuildNumber=$CI_BUILD_NUMBER $REPOX_ARGS"
+
case "$RUN_ACTIVITY" in
run-db-unit-tests-*)
DB_ENGINE=$(sed "s/run-db-unit-tests-//g" <<< $RUN_ACTIVITY)
- ./run-db-unit-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties"
+ ./run-db-unit-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" \
+ ${TEST_ARGS}
;;
run-db-integration-tests-*)
DB_ENGINE=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 1)
- CATEGORY_GROUP=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 2)
+ CATEGORY=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 2)
if [[ "$GITHUB_BRANCH" != "PULLREQUEST-"* ]] && [[ "$GITHUB_BRANCH" != "master" ]] && [[ "$GITHUB_BRANCH" != "branch-"* ]] && [[ "$GITHUB_BRANCH" != "dogfood-on-next" ]]; then
# do not execute QA tests on feature branch outside pull request
@@ -27,70 +31,28 @@ case "$RUN_ACTIVITY" in
exit 0
else
- mvn clean package -B -e -V -f tests/plugins/pom.xml
-
- case "$CATEGORY_GROUP" in
- Category1)
- CATEGORY="Category1|authorization|measure|qualityGate|source"
- ;;
-
- Category2)
- CATEGORY="issue|test|qualityModel"
- ;;
-
- Category3)
- CATEGORY="Category3|component|project"
- ;;
-
- Category4)
- CATEGORY="Category4|duplication|user|webhook"
- ;;
-
- Category5)
- CATEGORY="Category5"
- ;;
-
- Category6)
- CATEGORY="Category6|organization"
- ;;
-
- *)
- echo "unknown CATEGORY_GROUP: $CATEGORY_GROUP"
- exit 1
- ;;
- esac
-
- mvn verify \
- -f tests/pom.xml \
+ ./gradlew --no-daemon --console plain -i \
+ :tests:integrationTest \
-Dcategory="$CATEGORY" \
-Dorchestrator.configUrl="http://infra.internal.sonarsource.com/jenkins/orch-$DB_ENGINE.properties" \
- -Pwith-db-drivers \
- -B -e -V
+ ${TEST_ARGS}
fi
;;
run-it-released-plugins)
- ./run-integration-tests.sh "Plugins" "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties"
+ ./run-integration-tests.sh "Plugins" "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties" \
+ ${TEST_ARGS}
;;
run-perf-tests)
- if [[ "$GITHUB_BRANCH" == "PULLREQUEST-"* ]]; then
- # do not execute Perf tests on feature branch outside pull request
- exit 0
- else
- ./run-perf-tests.sh
- fi
+ ./run-perf-tests.sh \
+ ${TEST_ARGS}
;;
run-upgrade-tests-*)
DB_ENGINE=$(sed "s/run-upgrade-tests-//g" <<< $RUN_ACTIVITY)
- if [[ "$GITHUB_BRANCH" != "master" ]] && [[ "$GITHUB_BRANCH" != "branch-"* ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then
- # restrict upgrade tests to PostgreSQL on feature branches and dogfood
- exit 0
-
- else
- ./run-upgrade-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties"
- fi
+ ./run-upgrade-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" \
+ ${TEST_ARGS}
;;
*)
diff --git a/cve-false-positives.xml b/cve-false-positives.xml
deleted file mode 100644
index 39a01d9e778..00000000000
--- a/cve-false-positives.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<suppressions xmlns="https://www.owasp.org/index.php/OWASP_Dependency_Check_Suppression">
- <suppress>
- <notes><![CDATA[
- file name: gson-2.3.1.jar
- ]]></notes>
- <sha1>ECB6E1F8E4B0E84C4B886C2F14A1500CAF309757</sha1>
- <cpe>cpe:/a:google:v8:2.3.1</cpe>
- </suppress>
- <suppress>
- <notes><![CDATA[
- file name: geronimo-spec-jta-1.0-M1.jar
- ]]></notes>
- <sha1>1F01F94B5B83C33950E22CDE224868407FDF8B99</sha1>
- <cpe>cpe:/a:apache:geronimo:1.0.m1</cpe>
- </suppress>
-</suppressions>
diff --git a/find-classpath-conflicts.sh b/find-classpath-conflicts.sh
deleted file mode 100755
index 866de0e65b4..00000000000
--- a/find-classpath-conflicts.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Search for duplication of classes in classpath
-# This check can not be automated in build yet as current
-# conflicts must be fixed.
-
-mvn org.basepom.maven:duplicate-finder-maven-plugin:check
diff --git a/format-headers.sh b/format-headers.sh
deleted file mode 100755
index e354ddf14ad..00000000000
--- a/format-headers.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-# Set correct copyright headers
-
-mvn license:format -Ptests
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 00000000000..6ecff8dc4e2
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,4 @@
+group = org.sonarsource.sonarqube
+version = 7.1-SNAPSHOT
+description = 'Open source platform for continuous inspection of code quality'
+projectTitle = SonarQube
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000000..c44b679acd3
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000000..568c50bf3a4
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 00000000000..cccdd3d517f
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 00000000000..e95643d6a2c
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/plugins/build.gradle b/plugins/build.gradle
new file mode 100644
index 00000000000..6b01df30596
--- /dev/null
+++ b/plugins/build.gradle
@@ -0,0 +1,3 @@
+sonarqube {
+ skipProject = true
+}
diff --git a/plugins/sonar-xoo-plugin/build.gradle b/plugins/sonar-xoo-plugin/build.gradle
new file mode 100644
index 00000000000..ff4cd6c0080
--- /dev/null
+++ b/plugins/sonar-xoo-plugin/build.gradle
@@ -0,0 +1,44 @@
+configurations {
+ testCompile.extendsFrom(compileOnly)
+}
+
+dependencies {
+ compile 'com.google.guava:guava'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'xoo',
+ 'Plugin-Version': project.version,
+ 'Plugin-Class': 'org.sonar.xoo.XooPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': project.version,
+ 'SonarLint-Supported': 'true',
+ 'Plugin-Name': 'Xoo'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
+
+artifactoryPublish.skip = false
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/plugins/sonar-xoo-plugin/pom.xml b/plugins/sonar-xoo-plugin/pom.xml
deleted file mode 100644
index 0dcffa82b49..00000000000
--- a/plugins/sonar-xoo-plugin/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
- <artifactId>sonar-xoo-plugin</artifactId>
- <name>SonarQube :: Plugins :: Xoo</name>
- <packaging>sonar-plugin</packaging>
- <description>Sample of plugin to document and test available APIs</description>
-
- <properties>
- <sonar.skip>true</sonar.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <configuration>
- <pluginKey>xoo</pluginKey>
- <pluginName>Xoo</pluginName>
- <pluginClass>org.sonar.xoo.XooPlugin</pluginClass>
- <sonarLintSupported>true</sonarLintSupported>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 6adcdfb8628..00000000000
--- a/pom.xml
+++ /dev/null
@@ -1,1554 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.parent</groupId>
- <artifactId>parent</artifactId>
- <version>44</version>
- </parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <packaging>pom</packaging>
- <version>7.1-SNAPSHOT</version>
- <name>SonarQube</name>
- <url>http://www.sonarqube.org/</url>
- <description>Open source platform for continuous inspection of code quality</description>
-
- <modules>
- <module>sonar-plugin-api-deps</module>
- <module>sonar-application</module>
- <module>sonar-scanner-engine</module>
- <module>sonar-scanner-protocol</module>
- <module>sonar-scanner-engine-shaded</module>
- <module>sonar-check-api</module>
- <module>sonar-core</module>
- <module>sonar-duplications</module>
- <module>sonar-home</module>
- <module>sonar-markdown</module>
- <module>sonar-plugin-api</module>
- <module>server</module>
- <module>sonar-ws</module>
- <module>sonar-ws-generator</module>
- <module>sonar-testing-harness</module>
- <module>plugins/sonar-xoo-plugin</module>
- </modules>
-
- <organization>
- <name>SonarSource</name>
- <url>http://www.sonarsource.com</url>
- </organization>
- <inceptionYear>2009</inceptionYear>
-
- <issueManagement>
- <system>jira</system>
- <url>http://jira.sonarsource.com/browse/SONAR</url>
- </issueManagement>
-
- <properties>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/dotnet/sonar-csharp-plugin/ -->
- <!-- Do not forget to exclude any new transitive dependencies -->
- <sonarCSharp.version>6.7.1.4347</sonarCSharp.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/java/sonar-java-plugin/ -->
- <!-- Do not forget to exclude any new transitive dependencies -->
- <sonarJava.version>5.1.0.13090</sonarJava.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/javascript/sonar-javascript-plugin/ -->
- <!-- Do not forget to exclude any new transitive dependencies -->
- <sonarJavaScript.version>4.0.0.5862</sonarJavaScript.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/php/sonar-php-plugin/ -->
- <!-- Do not forget to exclude any new transitive dependencies -->
- <sonarPhp.version>2.12.1.3018</sonarPhp.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/python/sonar-python-plugin/ -->
- <!-- Do not forget to exclude any new transitive dependencies -->
- <sonarPython.version>1.9.0.2010</sonarPython.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/flex/sonar-flex-plugin/ -->
- <!-- Do not forget to exclude any new transitive dependencies -->
- <sonarFlex.version>2.3</sonarFlex.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/xml/sonar-xml-plugin/ -->
- <!-- Do not forget to exclude any new transitive dependencies -->
- <sonarXml.version>1.4.3.1027</sonarXml.version>
- <!-- see https://repo1.maven.org/maven2/org/sonarsource/typescript/sonar-typescript-plugin/ -->
- <sonarTs.version>1.5.0.2122</sonarTs.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/scm/git/sonar-scm-git-plugin/ -->
- <sonarGit.version>1.3.0.869</sonarGit.version>
- <!-- see http://repo1.maven.org/maven2/org/sonarsource/scm/svn/sonar-scm-svn-plugin/ -->
- <sonarSvn.version>1.6.0.860</sonarSvn.version>
- <sonarUpdateCenter.version>1.18.0.487</sonarUpdateCenter.version>
- <h2.version>1.3.176</h2.version>
- <jetty.version>8.1.12.v20130726</jetty.version>
- <logback.version>1.2.3</logback.version>
- <slf4j.version>1.7.25</slf4j.version>
-
- <!-- Be aware that Log4j is used by Elasticsearch client -->
- <log4j.version>2.8.2</log4j.version>
- <tomcat.version>8.5.23</tomcat.version>
- <elasticsearch.version>5.6.3</elasticsearch.version>
- <orchestrator.version>3.15.2.1322</orchestrator.version>
- <okhttp.version>3.7.0</okhttp.version>
- <jackson.version>2.6.6</jackson.version>
- <jjwt.version>0.9.0</jjwt.version>
- <protobuf.version>3.5.1</protobuf.version>
-
- <hazelcast.version>3.8.6</hazelcast.version>
-
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.min.version>3.3.9</maven.min.version>
- <timestamp>${maven.build.timestamp}</timestamp>
- <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
- <license.title>SonarQube</license.title>
-
- <skipSanityChecks>false</skipSanityChecks>
-
- <argLine>-Xmx512m -Djava.awt.headless=true</argLine>
- <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
-
- <!-- used for deployment to SonarSource Artifactory -->
- <gitRepositoryName>sonarqube</gitRepositoryName>
- <!-- Release: enable publication to Bintray -->
- <artifactsToPublish>${project.groupId}:sonar-application:zip</artifactsToPublish>
- </properties>
-
- <build>
- <extensions>
- <extension>
- <groupId>kr.motd.maven</groupId>
- <artifactId>os-maven-plugin</artifactId>
- <version>1.5.0.Final</version>
- </extension>
- </extensions>
-
- <pluginManagement>
- <!-- Plugins ordered by shortname (assembly, antrun ...) -->
- <plugins>
- <plugin>
- <groupId>com.github.eirslett</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <version>1.6</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <archiverConfig>
- <!-- Workaround for http://jira.codehaus.org/browse/MASSEMBLY-422 -->
- <!-- 420(dec) = 644(oct) -->
- <fileMode>420</fileMode>
- <!-- 493(dec) = 755(oct) -->
- <directoryMode>493</directoryMode>
- <defaultDirectoryMode>493</defaultDirectoryMode>
- </archiverConfig>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.0.0</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <version>3.0.0</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.0.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>3.0.0-M1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <version>1.6</version>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.9</version>
- <configuration>
- <excludes>
- <exclude>*_javassist_*</exclude>
- </excludes>
- <includes>
- <include>org.sonar.*</include>
- <include>org.sonarqube.*</include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.0.0-M1</version>
- <configuration>
- <author>false</author>
- <linksource>true</linksource>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.0.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.5</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.0.2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>3.1.0</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>3.0.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.20.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>3.2.0</version>
- </plugin>
- <plugin>
- <!-- not thread safe -->
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-dev-maven-plugin</artifactId>
- <version>1.8</version>
- </plugin>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.18.0.372</version>
- </plugin>
- <plugin>
- <groupId>org.owasp</groupId>
- <artifactId>dependency-check-maven</artifactId>
- <version>3.0.1</version>
- <configuration>
- <failBuildOnCVSS>8</failBuildOnCVSS>
- <suppressionFile>dependency-check-suppressions.xml</suppressionFile>
- <enableExperimental>true</enableExperimental>
- </configuration>
- </plugin>
- <plugin>
- <!--
- Detection of conflicts in classpath.
- Command line is: mvn org.basepom.maven:duplicate-finder-maven-plugin:check
- See https://github.com/basepom/duplicate-finder-maven-plugin
- -->
- <groupId>org.basepom.maven</groupId>
- <artifactId>duplicate-finder-maven-plugin</artifactId>
- <version>1.1.1</version>
- <configuration>
- <printEqualFiles>true</printEqualFiles>
- <!--
- <failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
- <failBuildInCaseOfEqualContentConflict>true</failBuildInCaseOfEqualContentConflict>
- <failBuildInCaseOfConflict>true</failBuildInCaseOfConflict>
- -->
- <checkCompileClasspath>true</checkCompileClasspath>
- <checkRuntimeClasspath>true</checkRuntimeClasspath>
- <checkTestClasspath>false</checkTestClasspath>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.xolstice.maven.plugins</groupId>
- <artifactId>protobuf-maven-plugin</artifactId>
- <version>0.5.1</version>
- </plugin>
- <plugin>
- <groupId>com.github.genthaler</groupId>
- <artifactId>beanshell-maven-plugin</artifactId>
- <version>1.4</version>
- </plugin>
- </plugins>
- </pluginManagement>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-rules</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requirePluginVersions>
- <message>Build reproducibility : always define plugin versions</message>
- <banLatest>true</banLatest>
- <banRelease>true</banRelease>
- <phases>clean,deploy</phases>
- </requirePluginVersions>
- <requireReleaseDeps>
- <message>No SNAPSHOT versions allowed for dependencies</message>
- <onlyWhenRelease>true</onlyWhenRelease>
- </requireReleaseDeps>
- <requireJavaVersion>
- <message>To build this project JDK ${jdk.min.version} (or upper) is required. Please install it.
- </message>
- <version>${jdk.min.version}</version>
- </requireJavaVersion>
- <requireMavenVersion>
- <version>[${maven.min.version},)</version>
- </requireMavenVersion>
- <bannedDependencies>
- <!-- See SONAR-2512 -->
- <message>commons-beanutils:commons-beanutils should be used instead</message>
- <excludes>
- <exclude>commons-beanutils:commons-beanutils-core</exclude>
- </excludes>
- <searchTransitive>true</searchTransitive>
- </bannedDependencies>
- <requireNoRepositories>
- <message>Definition of new repositories is not allowed in order to deploy to central repository.
- </message>
- </requireNoRepositories>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!--
- Choosing a random timezone when executing tests allows to detect
- early the tests that are coupled with local environment.
- -->
- <plugin>
- <groupId>com.github.genthaler</groupId>
- <artifactId>beanshell-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>randomize-environment</id>
- <phase>validate</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <quiet>true</quiet>
- <script>
- <![CDATA[
- String[] timezones = new String[] {"GMT-9", "UTC", "GMT+9"};
- String testTimezone = timezones[new java.util.Random().nextInt(timezones.length)];
- project.getProperties().setProperty("testTimezone", testTimezone);
- logger.info("Timezone used for tests: " + testTimezone);
- ]]>
- </script>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- <linkJavadoc>true</linkJavadoc>
- <javadocDir>${project.reporting.outputDirectory}/${project.version}/apidocs</javadocDir>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <runOrder>random</runOrder>
- <systemPropertyVariables>
- <!-- keep system temp directory clean -->
- <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
- <!--
- See profile 'randomize-environment'
- -->
- <user.timezone>${testTimezone}</user.timezone>
- </systemPropertyVariables>
- <threadCount>1</threadCount>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencyManagement>
- <dependencies>
- <!-- SonarQube modules -->
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-channel</artifactId>
- <version>4.1</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-classloader</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-markdown</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-dao</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-migration</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-testing</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-scanner-protocol</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-ws</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-home</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-process</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.update-center</groupId>
- <artifactId>sonar-update-center-common</artifactId>
- <version>${sonarUpdateCenter.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.orchestrator</groupId>
- <artifactId>sonar-orchestrator</artifactId>
- <version>${orchestrator.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-squid</artifactId>
- <version>4.1</version>
- <exclusions>
- <exclusion>
- <!--
- Provided at runtime by sonar-plugin-api.
- Do not use transitive version 4.1 but the current version.
- -->
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-check-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-xoo-plugin</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.scm.git</groupId>
- <artifactId>sonar-scm-git-plugin</artifactId>
- <version>${sonarGit.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>org.eclipse.jgit</groupId>
- <artifactId>org.eclipse.jgit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.scm.svn</groupId>
- <artifactId>sonar-scm-svn-plugin</artifactId>
- <version>${sonarSvn.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>org.tmatesoft.svnkit</groupId>
- <artifactId>svnkit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.typescript</groupId>
- <artifactId>sonar-typescript-plugin</artifactId>
- <version>${sonarTs.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <exclusion>
- <groupId>org.sonarsource.analyzer-commons</groupId>
- <artifactId>sonar-analyzer-commons</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-db-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-db-testing</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-bridge</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.java</groupId>
- <artifactId>sonar-java-plugin</artifactId>
- <version>${sonarJava.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>classworlds</groupId>
- <artifactId>classworlds</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.java</groupId>
- <artifactId>java-surefire</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.java</groupId>
- <artifactId>java-jacoco</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.java</groupId>
- <artifactId>java-frontend</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.java</groupId>
- <artifactId>java-checks</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.javascript</groupId>
- <artifactId>sonar-javascript-plugin</artifactId>
- <version>${sonarJavaScript.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>org.sonarsource.javascript</groupId>
- <artifactId>javascript-frontend</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.javascript</groupId>
- <artifactId>javascript-checks</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.dotnet</groupId>
- <artifactId>sonar-csharp-plugin</artifactId>
- <version>${sonarCSharp.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <exclusion>
- <groupId>org.sonarsource.dotnet</groupId>
- <artifactId>sonar-dotnet-tests-library</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.dotnet</groupId>
- <artifactId>sonar-dotnet-shared-library</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.sslr-squid-bridge</groupId>
- <artifactId>sslr-squid-bridge</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.php</groupId>
- <artifactId>sonar-php-plugin</artifactId>
- <version>${sonarPhp.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>org.sonarsource.php</groupId>
- <artifactId>php-frontend</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.php</groupId>
- <artifactId>php-checks</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.python</groupId>
- <artifactId>sonar-python-plugin</artifactId>
- <version>${sonarPython.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>org.sonarsource.python</groupId>
- <artifactId>python-squid</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.python</groupId>
- <artifactId>python-checks</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-lgpl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.staxmate</groupId>
- <artifactId>staxmate</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.flex</groupId>
- <artifactId>sonar-flex-plugin</artifactId>
- <version>${sonarFlex.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>org.sonarsource.flex</groupId>
- <artifactId>flex-squid</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.flex</groupId>
- <artifactId>flex-checks</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.xml</groupId>
- <artifactId>sonar-xml-plugin</artifactId>
- <version>${sonarXml.version}</version>
- <type>sonar-plugin</type>
- <exclusions>
- <!--
- no need for transitive dependencies as only the JAR file
- is needed for the zip bundle
- -->
- <exclusion>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.sonarsource.xml</groupId>
- <artifactId>xml-squid</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast</artifactId>
- <version>${hazelcast.version}</version>
- </dependency>
- <dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast-client</artifactId>
- <version>${hazelcast.version}</version>
- </dependency>
- <dependency>
- <groupId>org.elasticsearch.client</groupId>
- <artifactId>transport</artifactId>
- <version>${elasticsearch.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.elasticsearch.plugin</groupId>
- <artifactId>lang-mustache-client</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.elasticsearch.plugin</groupId>
- <artifactId>transport-netty3-client</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.github.tlrx</groupId>
- <artifactId>elasticsearch-test</artifactId>
- <version>1.2.1</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>18.0</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <version>3.0.2</version>
- </dependency>
- <dependency>
- <groupId>commons-dbutils</groupId>
- <artifactId>commons-dbutils</artifactId>
- <version>1.5</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-csv</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.8</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- <version>1.5</version>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- </dependency>
- <dependency>
- <groupId>commons-dbcp</groupId>
- <artifactId>commons-dbcp</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>com.ibm.icu</groupId>
- <artifactId>icu4j</artifactId>
- <!-- animal-sniffer doesn't work with 2.6.1 -->
- <version>3.4.4</version>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.3.0</version>
- </dependency>
- <dependency>
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- <version>1.1.1</version>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>io.jsonwebtoken</groupId>
- <artifactId>jjwt</artifactId>
- <version>${jjwt.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- <version>1.15</version>
- </dependency>
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis</artifactId>
- <version>3.4.4</version>
- </dependency>
- <dependency>
- <groupId>org.nanohttpd</groupId>
- <artifactId>nanohttpd</artifactId>
- <version>2.3.0</version>
- </dependency>
- <dependency>
- <groupId>org.picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- <version>2.15</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jul-to-slf4j</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-to-slf4j</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-access</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <version>${h2.version}</version>
- </dependency>
- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>mssql-jdbc</artifactId>
- <version>6.2.2.jre8</version>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.42</version>
- </dependency>
- <dependency>
- <groupId>com.oracle.jdbc</groupId>
- <artifactId>ojdbc8</artifactId>
- <!--
- This version is compatible with Oracle 11g and 12c :
- http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#01_02
- -->
- <version>12.2.0.1.0</version>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>42.2.1</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-lgpl</artifactId>
- <version>4.4.0</version>
- <exclusions>
- <exclusion>
- <!-- provided by Java 1.7 -->
- <groupId>javax.xml.stream</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.codehaus.staxmate</groupId>
- <artifactId>staxmate</artifactId>
- <version>2.0.1</version>
- <exclusions>
- <!-- see SONAR-879 -->
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>stax2-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>2.13.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <version>3.9.0</version>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-guava</artifactId>
- <version>3.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>stax2-api</artifactId>
- <version>3.1.4</version>
- <exclusions>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- <version>1.3</version>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
- <version>1.3</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <version>1.9.2</version>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- <version>2.4.5</version>
- <exclusions>
- <!-- removing commons lang 2.1 and xerces-->
- <exclusion>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xmlParserAPIs</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>test-jetty-servlet</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.reflections</groupId>
- <artifactId>reflections</artifactId>
- <version>0.9.9</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.3.1</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource</groupId>
- <artifactId>sonar-persistit</artifactId>
- <version>3.3.2</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.github.kevinsawicki</groupId>
- <artifactId>http-request</artifactId>
- <version>5.4.1</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar.runner</groupId>
- <artifactId>sonar-runner-api</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>org.freemarker</groupId>
- <artifactId>freemarker</artifactId>
- <version>2.3.20</version>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf.version}</version>
- </dependency>
- <dependency>
- <groupId>net.jpountz.lz4</groupId>
- <artifactId>lz4</artifactId>
- <version>1.3.0</version>
- </dependency>
- <dependency>
- <groupId>org.subethamail</groupId>
- <artifactId>subethasmtp</artifactId>
- <version>3.1.7</version>
- <scope>test</scope>
- </dependency>
-
- <!-- tomcat -->
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- <version>${tomcat.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-jasper</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.eclipse.jdt</groupId>
- <artifactId>ecj</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- <version>${okhttp.version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>mockwebserver</artifactId>
- <version>${okhttp.version}</version>
- </dependency>
-
- <!-- Using scope=provided to exclude from all transitive dependencies -->
- <dependency>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- <version>1.4.01</version>
- <scope>provided</scope>
- </dependency>
-
- </dependencies>
- </dependencyManagement>
-
- <mailingLists>
- <mailingList>
- <name>SonarQube users mailing list</name>
- <subscribe>http://xircles.codehaus.org/projects/sonar/lists</subscribe>
- <unsubscribe>http://xircles.codehaus.org/projects/sonar/lists</unsubscribe>
- <post>user@sonar.codehaus.org</post>
- <archive>http://www.nabble.com/Sonar-f30151.html</archive>
- </mailingList>
- </mailingLists>
-
- <scm>
- <connection>scm:git:git@github.com:SonarSource/sonarqube.git</connection>
- <developerConnection>scm:git:git@github.com:SonarSource/sonarqube.git</developerConnection>
- <url>https://github.com/SonarSource/sonarqube</url>
- <tag>HEAD</tag>
- </scm>
-
- <ciManagement>
- <system>travis-ci</system>
- <url>https://travis-ci.org/SonarSource/sonarqube</url>
- </ciManagement>
-
- <licenses>
- <license>
- <name>GNU LGPL 3</name>
- <url>http://www.gnu.org/licenses/lgpl.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <!-- Developers information should not be removed as it's
- required for deployment -->
-
- <developers>
- <developer>
- <id>bellingard</id>
- <name>Fabrice Bellingard</name>
- <email>fabrice.bellingard@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>dbolkensteyn</id>
- <name>Dinesh Bolkensteyn</name>
- <email>dinesh.bolkensteyn@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>dgageot</id>
- <name>David Gageot</name>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>ehartmann</id>
- <name>Eric Hartmann</name>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>fmallet</id>
- <name>Freddy Mallet</name>
- <email>freddy.mallet@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>Godin</id>
- <name>Evgeny Mandrikov</name>
- <email>evgeny.mandrikov@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+3</timezone>
- </developer>
- <developer>
- <id>henryju</id>
- <name>Julien Henry</name>
- <email>julien.henry@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>jblievremont</id>
- <name>Jean-Baptiste Lievremont</name>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>julienlancelot</id>
- <name>Julien Lancelot</name>
- <email>julien.lancelot@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>olivier.gaudin</id>
- <name>Olivier Gaudin</name>
- <email>olivier.gaudin@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>simonbrandhof</id>
- <name>Simon Brandhof</name>
- <email>simon.brandhof@sonarsource.com</email>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>sns-seb</id>
- <name>Sebastien Lesaint</name>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>stas-vilchik</id>
- <name>Stas Vilchik</name>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>teryk</id>
- <name>Teryk Bellahsene</name>
- <organization>SonarSource</organization>
- <timezone>+1</timezone>
- </developer>
- </developers>
-
- <profiles>
- <profile>
- <id>dev</id>
- <properties>
- <skipSanityChecks>true</skipSanityChecks>
- <enforcer.skip>true</enforcer.skip>
- </properties>
- </profile>
- <profile>
- <id>release</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>protobuf-compile</id>
- <activation>
- <file>
- <exists>src/main/protobuf</exists>
- </file>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.xolstice.maven.plugins</groupId>
- <artifactId>protobuf-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-protobuf-java-sources</id>
- <goals>
- <goal>compile</goal>
- </goals>
- <configuration>
- <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
- </protocArtifact>
- <protoSourceRoot>${project.basedir}/src/main/protobuf</protoSourceRoot>
- <outputDirectory>${project.build.directory}/generated-sources/protobuf</outputDirectory>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protoc</artifactId>
- <version>${protobuf.version}</version>
- <type>exe</type>
- <classifier>${os.detected.classifier}</classifier>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-protobuf-generated-sources</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/generated-sources/protobuf</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>protobuf-test-compile</id>
- <activation>
- <file>
- <exists>src/test/protobuf</exists>
- </file>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.xolstice.maven.plugins</groupId>
- <artifactId>protobuf-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-protobuf-java-tests</id>
- <goals>
- <goal>test-compile</goal>
- </goals>
- <configuration>
- <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
- </protocArtifact>
- <protoTestSourceRoot>${project.basedir}/src/test/protobuf</protoTestSourceRoot>
- <outputDirectory>${project.build.directory}/generated-test-sources/protobuf</outputDirectory>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protoc</artifactId>
- <version>${protobuf.version}</version>
- <classifier>${os.detected.classifier}</classifier>
- <type>exe</type>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-protobuf-generated-tests</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/generated-test-sources/protobuf</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <!--
- check if maven dependencies have vulnerabilities listed in CVE
- Standalone command: mvn org.owasp:dependency-check-maven:check
- See http://jeremylong.github.io/DependencyCheck
- -->
- <id>securityCheck</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.owasp</groupId>
- <artifactId>dependency-check-maven</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <!-- integration tests -->
- <id>tests</id>
- <modules>
- <module>tests</module>
- <module>tests/plugins</module>
- </modules>
- </profile>
-
- <profile>
- <id>deploy-sonarsource</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-deploy-settings</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>gitRepositoryName</property>
- <message>You must set name of Git repository in your pom</message>
- </requireProperty>
- <requireEnvironmentVariable>
- <variableName>ARTIFACTORY_URL</variableName>
- </requireEnvironmentVariable>
- <requireEnvironmentVariable>
- <variableName>ARTIFACTORY_DEPLOY_REPO</variableName>
- </requireEnvironmentVariable>
- <requireEnvironmentVariable>
- <variableName>ARTIFACTORY_DEPLOY_USERNAME</variableName>
- </requireEnvironmentVariable>
- <requireEnvironmentVariable>
- <variableName>ARTIFACTORY_DEPLOY_PASSWORD</variableName>
- </requireEnvironmentVariable>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <!-- this maven plugin is not deployed in Maven Central. It should be downloaded
- from JFrog JCenter or from SonarSource repositories -->
- <groupId>org.jfrog.buildinfo</groupId>
- <artifactId>artifactory-maven-plugin</artifactId>
- <version>${version.artifactory.plugin}</version>
- <executions>
- <execution>
- <id>build-info</id>
- <goals>
- <goal>publish</goal>
- </goals>
- <configuration>
- <artifactory>
- <envVarsExcludePatterns>
- *password*,*PASSWORD*,*secret*,*MAVEN_CMD_LINE_ARGS*,sun.java.command,*token*,*TOKEN*,*LOGIN*,*login*
- </envVarsExcludePatterns>
- <includeEnvVars>true</includeEnvVars>
- <timeoutSec>60</timeoutSec>
- </artifactory>
- <deployProperties>
- <build.name>${gitRepositoryName}</build.name>
- <build.number>{{BUILD_NUMBER}}</build.number>
- <pr.branch.target>{{PULL_REQUEST_BRANCH_TARGET}}</pr.branch.target>
- <pr.number>{{PULL_REQUEST_NUMBER}}</pr.number>
- <vcs.branch>{{GIT_BRANCH}}</vcs.branch>
- <vcs.revision>{{GIT_COMMIT}}</vcs.revision>
- <version>${project.version}</version>
- </deployProperties>
- <licenses>
- <autoDiscover>true</autoDiscover>
- <includePublishedArtifacts>false</includePublishedArtifacts>
- <runChecks>true</runChecks>
- <scopes>project,provided</scopes>
- <violationRecipients>licences-control@sonarsource.com</violationRecipients>
- </licenses>
- <publisher>
- <contextUrl>${env.ARTIFACTORY_URL}</contextUrl>
- <repoKey>${env.ARTIFACTORY_DEPLOY_REPO}</repoKey>
- <username>${env.ARTIFACTORY_DEPLOY_USERNAME}</username>
- <password>${env.ARTIFACTORY_DEPLOY_PASSWORD}</password>
- <publishBuildInfo>true</publishBuildInfo>
- <publishArtifacts>true</publishArtifacts>
- </publisher>
- <buildInfo>
- <buildName>${gitRepositoryName}</buildName>
- <buildNumber>{{BUILD_NUMBER}}</buildNumber>
- <buildUrl>{{CI_BUILD_URL|BUILD_URL}}</buildUrl>
- <vcsRevision>{{GIT_COMMIT}}</vcsRevision>
- </buildInfo>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- </profiles>
-
-</project>
diff --git a/quick-build.sh b/quick-build.sh
deleted file mode 100755
index b53a26a27f0..00000000000
--- a/quick-build.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-#export MAVEN_OPTS='-Xmx256m'
-
-cat << 'EOF'
-
-
- uuuuuuu
- uu$$$$$$$$$$$uu
- uu$$$$$$$$$$$$$$$$$uu
- u$$$$$$$$$$$$$$$$$$$$$u
- u$$$$$$$$$$$$$$$$$$$$$$$u
- u$$$$$$$$$$$$$$$$$$$$$$$$$u
- u$$$$$$$$$$$$$$$$$$$$$$$$$u
- u$$$$$$" "$$$" "$$$$$$u
- "$$$$" u$u $$$$"
- $$$u u$u u$$$
- $$$u u$$$u u$$$
- "$$$$uu$$$ $$$uu$$$$"
- "$$$$$$$" "$$$$$$$"
- u$$$$$$$u$$$$$$$u
- u$"$"$"$"$"$"$u
- uuu $$u$ $ $ $ $u$$ uuu
- u$$$$ $$$$$u$u$u$$$ u$$$$
- $$$$$uu "$$$$$$$$$" uu$$$$$$
-u$$$$$$$$$$$uu """"" uuuu$$$$$$$$$$
-$$$$"""$$$$$$$$$$uuu uu$$$$$$$$$"""$$$"
- """ ""$$$$$$$$$$$uu ""$"""
- uuuu ""$$$$$$$$$$uuu
- u$$$uuu$$$$$$$$$uu ""$$$$$$$$$$$uuu$$$
- $$$$$$$$$$"""" ""$$$$$$$$$$$"
- "$$$$$" ""$$$$""
- $$$" $$$$"
-
-
- TESTS ARE DISABLED
- ARE U CRAZY ?
-
-
-
-EOF
-
-./stop.sh
-mvn clean install -B -e -V -DskipTests=true -Dmaven.source.skip=true -Pdev,skipSanityChecks $*
diff --git a/run-db-unit-tests.sh b/run-db-unit-tests.sh
index 7eea321bbeb..6a3d7eceb9e 100755
--- a/run-db-unit-tests.sh
+++ b/run-db-unit-tests.sh
@@ -4,8 +4,10 @@ set -euo pipefail
ORCHESTRATOR_CONFIG_URL=$1
shift
-mvn verify \
- -pl :sonar-db-core,:sonar-db-migration,:sonar-db-dao \
+./gradlew --no-daemon \
+ :server:sonar-db-core:createDB \
+ :server:sonar-db-core:test \
+ :server:sonar-db-migration:test \
+ :server:sonar-db-dao:test \
-Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
- -Dwith-db-drivers \
- -B -e -V $*
+ $*
diff --git a/run-integration-tests.sh b/run-integration-tests.sh
index 82ea7a8b1a2..78ce995c7c4 100755
--- a/run-integration-tests.sh
+++ b/run-integration-tests.sh
@@ -16,12 +16,8 @@ CATEGORY=$1
ORCHESTRATOR_CONFIG_URL=$2
shift 2
-cd tests/plugins
-mvn clean package -B -e -V
-
-cd ..
-mvn verify \
+./gradlew --no-daemon --console plain -i \
+ :tests:integrationTest \
-Dcategory="$CATEGORY" \
- -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
- -Pwith-db-drivers \
- -B -e -V $*
+ -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
+ $*
diff --git a/run-perf-tests.sh b/run-perf-tests.sh
index 4a5e6eba726..5374319ac43 100755
--- a/run-perf-tests.sh
+++ b/run-perf-tests.sh
@@ -2,5 +2,8 @@
set -euo pipefail
echo 'Run performance tests'
-cd tests
-mvn verify -B -e -V -Dcategory=ServerPerformance $*
+
+./gradlew --no-daemon --console plain -i \
+ :tests:integrationTest \
+ -Dcategory=ServerPerformance \
+ $*
diff --git a/run-upgrade-tests.sh b/run-upgrade-tests.sh
index 696d4eedf66..97a838557b7 100755
--- a/run-upgrade-tests.sh
+++ b/run-upgrade-tests.sh
@@ -13,8 +13,8 @@ set -euo pipefail
ORCHESTRATOR_CONFIG_URL=$1
shift 1
-cd tests
-mvn verify \
- -Pwith-db-drivers \
+./gradlew --no-daemon --console plain -i \
+ :tests:integrationTest \
-Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
- -Dcategory=Upgrade -B -e -V $*
+ -Dcategory=Upgrade \
+ $* \ No newline at end of file
diff --git a/scripts/logs.sh b/scripts/logs.sh
index 24a7a5e26a7..a553c4d2ffb 100755
--- a/scripts/logs.sh
+++ b/scripts/logs.sh
@@ -78,7 +78,7 @@ if [ "$script_name" == "logs.sh" ]; then
checkLogArgument "$LOG"
ROOT=$(pwd)
- cd sonar-application/target/sonarqube-*
+ cd sonar-application/build/distributions/sonarqube-*
SQ_HOME=$(pwd)
cd "$ROOT"
diff --git a/scripts/start.sh b/scripts/start.sh
index 24240bf7e54..b82329e15f3 100755
--- a/scripts/start.sh
+++ b/scripts/start.sh
@@ -36,15 +36,15 @@ else
OS='linux-x86-64'
fi
-if ! ls sonar-application/target/sonarqube-*.zip &> /dev/null; then
+if ! ls sonar-application/build/distributions/sonar-application-*.zip &> /dev/null; then
echo 'Sources are not built'
"$ROOT"/build.sh
fi
-cd sonar-application/target/
+cd sonar-application/build/distributions/
if ! ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null; then
echo "Unzipping SQ..."
- unzip -qq sonarqube-*.zip
+ unzip -qq sonar-application-*.zip
fi
cd $(find sonarqube-* -type d | head -1)
diff --git a/server/build.gradle b/server/build.gradle
new file mode 100644
index 00000000000..49d6218996b
--- /dev/null
+++ b/server/build.gradle
@@ -0,0 +1,5 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Server :: Parent"
+ }
+}
diff --git a/server/pom.xml b/server/pom.xml
deleted file mode 100644
index c4e4974bfb0..00000000000
--- a/server/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
- <artifactId>server</artifactId>
- <packaging>pom</packaging>
- <name>SonarQube :: Server :: Parent</name>
-
- <modules>
- <module>sonar-process</module>
- <module>sonar-main</module>
- <module>sonar-db-core</module>
- <module>sonar-db-migration</module>
- <module>sonar-db-dao</module>
- <module>sonar-db-testing</module>
- <module>sonar-server</module>
- <module>sonar-ce</module>
- <module>sonar-plugin-bridge</module>
- <module>sonar-web</module>
- <module>sonar-qa-util</module>
- </modules>
-
- <profiles>
-
- <profile>
- <!-- SonarSource internal use -->
- <id>with-db-drivers</id>
- <activation>
- <property>
- <name>with-db-drivers</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>mssql-jdbc</artifactId>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- </dependency>
- <dependency>
- <groupId>com.oracle.jdbc</groupId>
- <artifactId>ojdbc8</artifactId>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-</project>
diff --git a/server/sonar-ce/build.gradle b/server/sonar-ce/build.gradle
new file mode 100644
index 00000000000..12b42b98696
--- /dev/null
+++ b/server/sonar-ce/build.gradle
@@ -0,0 +1,24 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Compute Engine"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'com.google.protobuf:protobuf-java'
+ compile 'org.nanohttpd:nanohttpd'
+ compile project(':server:sonar-server')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'com.google.code.findbugs:jsr305'
+ testCompile 'com.h2database:h2'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.assertj:assertj-guava'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':server:sonar-db-testing')
+}
diff --git a/server/sonar-ce/pom.xml b/server/sonar-ce/pom.xml
deleted file mode 100644
index 525eaf843e8..00000000000
--- a/server/sonar-ce/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>sonar-ce</artifactId>
- <name>SonarQube :: Compute Engine</name>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-server</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.nanohttpd</groupId>
- <artifactId>nanohttpd</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-guava</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-testing</artifactId>
- <type>pom</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java
index 5b093ff3156..de97563d60e 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java
@@ -28,9 +28,9 @@ import java.util.Optional;
import java.util.Set;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-import org.apache.log4j.Logger;
import org.sonar.api.ce.ComputeEngineSide;
import org.sonar.api.utils.System2;
+import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.ce.container.ComputeEngineStatus;
import org.sonar.ce.monitoring.CEQueueStatus;
@@ -50,7 +50,7 @@ import static java.util.Objects.requireNonNull;
@ComputeEngineSide
public class InternalCeQueueImpl extends CeQueueImpl implements InternalCeQueue {
- private static final org.sonar.api.utils.log.Logger LOG = Loggers.get(InternalCeQueueImpl.class);
+ private static final Logger LOG = Loggers.get(InternalCeQueueImpl.class);
private static final int MAX_EXECUTION_COUNT = 1;
@@ -145,7 +145,7 @@ public class InternalCeQueueImpl extends CeQueueImpl implements InternalCeQueue
printStream.flush();
return out.toString();
} catch (IOException e) {
- Logger.getLogger(InternalCeQueueImpl.class).debug("Failed to getStacktrace out of error", e);
+ LOG.debug("Failed to getStacktrace out of error", e);
return null;
}
}
diff --git a/server/sonar-db-core/build.gradle b/server/sonar-db-core/build.gradle
new file mode 100644
index 00000000000..bfb6921b78b
--- /dev/null
+++ b/server/sonar-db-core/build.gradle
@@ -0,0 +1,71 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Database Core"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'ch.qos.logback:logback-classic'
+ compile 'ch.qos.logback:logback-core'
+ compile 'commons-codec:commons-codec'
+ compile 'commons-dbcp:commons-dbcp'
+ compile 'commons-dbutils:commons-dbutils'
+ compile 'net.jpountz.lz4:lz4'
+ compile 'org.apache.commons:commons-csv'
+ compile 'org.mybatis:mybatis'
+ compile 'org.slf4j:slf4j-api'
+ compile project(':server:sonar-process')
+ compile project(':sonar-core')
+ compile project(':sonar-scanner-protocol')
+ compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'com.google.code.findbugs:jsr305'
+ testCompile 'com.h2database:h2'
+ testCompile 'com.microsoft.sqlserver:mssql-jdbc'
+ testCompile 'com.oracle.jdbc:ojdbc8'
+ testCompile 'junit:junit'
+ testCompile 'mysql:mysql-connector-java'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.dbunit:dbunit'
+ testCompile 'org.mockito:mockito-core'
+ testCompile 'org.postgresql:postgresql'
+ testCompile 'org.sonarsource.orchestrator:sonar-orchestrator'
+ testCompile project(':sonar-testing-harness')
+}
+
+task createDB(type:JavaExec) {
+ main = 'org.sonar.db.CreateDb'
+ classpath = sourceSets.test.runtimeClasspath
+ systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
+ systemProperty 'sonar.runtimeVersion', version
+ systemProperty 'orchestrator.artifactory.apiKey', System.getProperty('orchestrator.artifactory.apiKey')
+ systemProperty 'orchestrator.artifactory.repositories', System.getProperty('orchestrator.artifactory.repositories')
+}
+
+test {
+ if (System.hasProperty('orchestrator.configUrl'))
+ systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
+}
+
+task testJar(type: Jar) {
+ classifier = 'tests'
+ from sourceSets.test.output
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact testJar
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/server/sonar-db-core/pom.xml b/server/sonar-db-core/pom.xml
deleted file mode 100644
index 85e9af2469e..00000000000
--- a/server/sonar-db-core/pom.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-db-core</artifactId>
-
- <name>SonarQube :: Database Core</name>
- <description>Core Database support</description>
-
- <dependencies>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-csv</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-scanner-protocol</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-core</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-dbcp</groupId>
- <artifactId>commons-dbcp</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-dbutils</groupId>
- <artifactId>commons-dbutils</artifactId>
- </dependency>
- <dependency>
- <groupId>net.jpountz.lz4</groupId>
- <artifactId>lz4</artifactId>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-process</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!-- tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
-
-
- <!--
- JDBC drivers for MyBatis integration tests.
- They can't be moved to the profile run-mybatis-its because
- -->
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>logback-test.xml</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>create-db</id>
- <activation>
- <property>
- <name>env.SONARSOURCE_QA</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>download-sq</id>
- <goals>
- <goal>get</goal>
- </goals>
- <phase>generate-test-resources</phase>
- <configuration>
- <artifact>${project.groupId}:sonar-application:${project.version}:zip</artifact>
- <transitive>false</transitive>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.sonarsource.orchestrator</groupId>
- <artifactId>orchestrator-maven-plugin</artifactId>
- <version>${orchestrator.version}</version>
- <executions>
- <execution>
- <id>create-db</id>
- <goals>
- <goal>create-db</goal>
- </goals>
- <phase>generate-test-resources</phase>
- <configuration>
- <sqVersion>${project.version}</sqVersion>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java b/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java
new file mode 100644
index 00000000000..b448b25fa87
--- /dev/null
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/CreateDb.java
@@ -0,0 +1,49 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.db;
+
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.OrchestratorBuilder;
+import com.sonar.orchestrator.locator.FileLocation;
+import org.apache.commons.lang.StringUtils;
+
+import java.io.File;
+
+public class CreateDb {
+
+ public static void main(String[] args) {
+ OrchestratorBuilder builder = Orchestrator.builderEnv();
+ String version = System.getProperty("sonar.runtimeVersion");
+ if (StringUtils.isEmpty(version)) {
+ File zip = FileLocation.byWildcardMavenFilename(new File("../../sonar-application/build/distributions"), "sonar-application-*.zip").getFile();
+ builder.setZipFile(zip);
+ } else {
+ builder.setSonarVersion(version);
+ }
+ builder.setOrchestratorProperty("orchestrator.workspaceDir", "build/it");
+
+ Orchestrator orchestrator = builder.build();
+ try {
+ orchestrator.start();
+ } finally {
+ orchestrator.stop();
+ }
+ }
+}
diff --git a/server/sonar-db-dao/build.gradle b/server/sonar-db-dao/build.gradle
new file mode 100644
index 00000000000..24a45f382e1
--- /dev/null
+++ b/server/sonar-db-dao/build.gradle
@@ -0,0 +1,51 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: DAO"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile project(':server:sonar-db-core')
+ compile project(':server:sonar-db-migration')
+ compile project(':sonar-core')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'com.h2database:h2'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.assertj:assertj-guava'
+ testCompile 'org.dbunit:dbunit'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+ testCompile project(':server:sonar-db-core').sourceSets.test.output
+
+ testCompileOnly 'com.google.code.findbugs:jsr305'
+}
+
+test {
+ if (System.hasProperty('orchestrator.configUrl'))
+ systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
+}
+
+task testJar(type: Jar) {
+ classifier = 'tests'
+ from sourceSets.test.output
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact testJar
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/server/sonar-db-dao/pom.xml b/server/sonar-db-dao/pom.xml
deleted file mode 100644
index 0d240e996e4..00000000000
--- a/server/sonar-db-dao/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-db-dao</artifactId>
-
- <name>SonarQube :: DAO</name>
- <description>DAO layer for SonarQube</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-db-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-db-migration</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-guava</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-core</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>logback-test.xml</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- </profiles>
-</project>
diff --git a/server/sonar-db-migration/build.gradle b/server/sonar-db-migration/build.gradle
new file mode 100644
index 00000000000..2198734c3a1
--- /dev/null
+++ b/server/sonar-db-migration/build.gradle
@@ -0,0 +1,42 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Database Migration"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile project(':server:sonar-db-core')
+ compile project(':sonar-core')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'com.google.code.findbugs:jsr305'
+ testCompile 'com.h2database:h2'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.dbunit:dbunit'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+ testCompile project(':server:sonar-db-core').sourceSets.test.output
+}
+
+test {
+ if (System.hasProperty('orchestrator.configUrl'))
+ systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/server/sonar-db-migration/pom.xml b/server/sonar-db-migration/pom.xml
deleted file mode 100644
index 1d75a632dde..00000000000
--- a/server/sonar-db-migration/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-db-migration</artifactId>
-
- <name>SonarQube :: Database Migration</name>
- <description>Create SonarQube schema</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-db-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-core</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/server/sonar-db-testing/build.gradle b/server/sonar-db-testing/build.gradle
new file mode 100644
index 00000000000..a7fddde0420
--- /dev/null
+++ b/server/sonar-db-testing/build.gradle
@@ -0,0 +1,15 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: DB testing"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'org.dbunit:dbunit'
+
+ compile project(':server:sonar-db-core').sourceSets.test.output
+ compile project(':server:sonar-db-dao').sourceSets.test.output
+ compile project(':sonar-testing-harness')
+}
diff --git a/server/sonar-db-testing/pom.xml b/server/sonar-db-testing/pom.xml
deleted file mode 100644
index 6799c132ba3..00000000000
--- a/server/sonar-db-testing/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-db-testing</artifactId>
- <packaging>pom</packaging>
-
- <name>SonarQube :: DB testing</name>
- <description>DB testing for SonarQube</description>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-core</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-dao</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- </build>
-
- <profiles>
- </profiles>
-</project>
diff --git a/server/sonar-main/build.gradle b/server/sonar-main/build.gradle
new file mode 100644
index 00000000000..936ace8238d
--- /dev/null
+++ b/server/sonar-main/build.gradle
@@ -0,0 +1,30 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Main Process"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'ch.qos.logback:logback-classic'
+ // Required by our usage of Guava for clustering : CeWorkerFactoryImpl.getClusteredWorkerUUIDs()
+ compile 'com.google.guava:guava'
+ compile 'com.hazelcast:hazelcast'
+ compile 'com.hazelcast:hazelcast-client'
+ compile 'org.apache.logging.log4j:log4j-to-slf4j'
+ compile 'org.apache.logging.log4j:log4j-api'
+ compile 'org.elasticsearch.client:transport'
+ compile 'org.slf4j:slf4j-api'
+ compile 'org.yaml:snakeyaml'
+ compile project(':server:sonar-process')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'com.google.code.findbugs:jsr305'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+}
diff --git a/server/sonar-main/pom.xml b/server/sonar-main/pom.xml
deleted file mode 100644
index 2540b6c76d9..00000000000
--- a/server/sonar-main/pom.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <artifactId>sonar-main</artifactId>
- <name>SonarQube :: Main Process</name>
- <description>Server process used to bootstrap Elasticsearch, Web Server and
- Compute Engine processes. Could be merged with sonar-application.</description>
-
- <properties>
- <!--
- version as stored in JAR and displayed in webapp. It is
- overridden on Travis when replacing SNAPSHOT version by
- build unique version, for instance "6.3.0.12345".
- -->
- <buildVersion>${project.version}</buildVersion>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-process</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-to-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
- <dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast</artifactId>
- </dependency>
- <dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- </dependency>
- <!--
- Required by our usage of Guava for clustering : CeWorkerFactoryImpl.getClusteredWorkerUUIDs()
- -->
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>org.elasticsearch.client</groupId>
- <artifactId>transport</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <!-- Used to resolve variables in file sonarqube-version.txt -->
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </build>
-</project>
diff --git a/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java
index 7c4c8c1b340..fdf1937b95d 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java
@@ -152,8 +152,7 @@ public class CommandFactoryImpl implements CommandFactory {
.setEnvVariable(PATH_LOGS.getKey(), props.nonNullValue(PATH_LOGS.getKey()))
.setArgument("sonar.cluster.web.startupLeader", Boolean.toString(leader))
.setClassName("org.sonar.server.app.WebServer")
- .addClasspath("./lib/common/*")
- .addClasspath("./lib/server/*");
+ .addClasspath("./lib/common/*");
String driverPath = props.value(JDBC_DRIVER_PATH.getKey());
if (driverPath != null) {
command.addClasspath(driverPath);
@@ -176,9 +175,7 @@ public class CommandFactoryImpl implements CommandFactory {
.setArguments(props.rawProperties())
.setJvmOptions(jvmOptions)
.setClassName("org.sonar.ce.app.CeServer")
- .addClasspath("./lib/common/*")
- .addClasspath("./lib/server/*")
- .addClasspath("./lib/ce/*");
+ .addClasspath("./lib/common/*");
String driverPath = props.value(JDBC_DRIVER_PATH.getKey());
if (driverPath != null) {
command.addClasspath(driverPath);
diff --git a/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java
index 4438fb768b6..08cf403ea09 100644
--- a/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java
@@ -96,7 +96,7 @@ public class CommandFactoryImplTest {
}
@Test
- public void createEsCommand_throws_ISE_if_es_binary_is_not_found() throws Exception {
+ public void createEsCommand_throws_ISE_if_es_binary_is_not_found() {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("Cannot find elasticsearch binary");
@@ -194,13 +194,13 @@ public class CommandFactoryImplTest {
}
@Test
- public void createWebCommand_returns_command_for_default_settings() throws Exception {
+ public void createWebCommand_returns_command_for_default_settings() {
JavaCommand command = newFactory(new Properties()).createWebCommand(true);
assertThat(command.getClassName()).isEqualTo("org.sonar.server.app.WebServer");
assertThat(command.getWorkDir().getAbsolutePath()).isEqualTo(homeDir.getAbsolutePath());
assertThat(command.getClasspath())
- .containsExactlyInAnyOrder("./lib/common/*", "./lib/server/*");
+ .containsExactly("./lib/common/*");
assertThat(command.getJvmOptions().getAll())
// enforced values
.contains("-Djava.awt.headless=true", "-Dfile.encoding=UTF-8")
@@ -219,13 +219,13 @@ public class CommandFactoryImplTest {
}
@Test
- public void createCeCommand_returns_command_for_default_settings() throws Exception {
+ public void createCeCommand_returns_command_for_default_settings() {
JavaCommand command = newFactory(new Properties()).createCeCommand();
assertThat(command.getClassName()).isEqualTo("org.sonar.ce.app.CeServer");
assertThat(command.getWorkDir().getAbsolutePath()).isEqualTo(homeDir.getAbsolutePath());
assertThat(command.getClasspath())
- .containsExactlyInAnyOrder("./lib/common/*", "./lib/server/*", "./lib/ce/*");
+ .containsExactly("./lib/common/*");
assertThat(command.getJvmOptions().getAll())
// enforced values
.contains("-Djava.awt.headless=true", "-Dfile.encoding=UTF-8")
@@ -244,7 +244,7 @@ public class CommandFactoryImplTest {
}
@Test
- public void createWebCommand_configures_command_with_overridden_settings() throws Exception {
+ public void createWebCommand_configures_command_with_overridden_settings() {
Properties props = new Properties();
props.setProperty("sonar.web.port", "1234");
props.setProperty("sonar.web.javaOpts", "-Xmx10G");
@@ -275,7 +275,7 @@ public class CommandFactoryImplTest {
JavaCommand command = newFactory(props).createWebCommand(true);
assertThat(command.getClasspath())
- .containsExactlyInAnyOrder("./lib/common/*", "./lib/server/*", driverFile.getAbsolutePath());
+ .containsExactlyInAnyOrder("./lib/common/*", driverFile.getAbsolutePath());
}
private void prepareEsFileSystem() throws IOException {
@@ -283,7 +283,7 @@ public class CommandFactoryImplTest {
FileUtils.touch(new File(homeDir, "elasticsearch/bin/elasticsearch.bat"));
}
- private CommandFactoryImpl newFactory(Properties userProps) throws IOException {
+ private CommandFactoryImpl newFactory(Properties userProps) {
return newFactory(userProps, System2.INSTANCE);
}
diff --git a/server/sonar-plugin-bridge/build.gradle b/server/sonar-plugin-bridge/build.gradle
new file mode 100644
index 00000000000..ea490280280
--- /dev/null
+++ b/server/sonar-plugin-bridge/build.gradle
@@ -0,0 +1,27 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Priviledged Plugin Bridge"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compile project(':sonar-core')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/server/sonar-plugin-bridge/pom.xml b/server/sonar-plugin-bridge/pom.xml
deleted file mode 100644
index efb105c904a..00000000000
--- a/server/sonar-plugin-bridge/pom.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>sonar-plugin-bridge</artifactId>
- <name>SonarQube :: Priviledged Plugin Bridge</name>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/server/sonar-process/build.gradle b/server/sonar-process/build.gradle
new file mode 100644
index 00000000000..b88b1371edb
--- /dev/null
+++ b/server/sonar-process/build.gradle
@@ -0,0 +1,49 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Process"
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'ch.qos.logback:logback-classic'
+ compile 'commons-codec:commons-codec'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compile 'com.google.guava:guava'
+ compile 'com.hazelcast:hazelcast'
+ compile 'org.slf4j:jul-to-slf4j'
+ compile 'org.slf4j:slf4j-api'
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly 'com.google.protobuf:protobuf-java'
+ compileOnly 'org.nanohttpd:nanohttpd'
+
+ testCompile 'com.google.code.findbugs:jsr305'
+ testCompile 'com.google.protobuf:protobuf-java'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+ // Workaround to resolve dependencies of eclipse specific packaging: https://issues.gradle.org/browse/GRADLE-2076
+ testCompile module('org.eclipse.jetty:jetty-server') {
+ dependencies(
+ "org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016@jar",
+ "org.eclipse.jetty:jetty-continuation:8.1.2.v20120308",
+ "org.eclipse.jetty:jetty-http:8.1.2.v20120308"
+ )
+ }
+}
+
+artifactoryPublish.skip = false
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/server/sonar-process/pom.xml b/server/sonar-process/pom.xml
deleted file mode 100644
index 11de60a732b..00000000000
--- a/server/sonar-process/pom.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
-
- <artifactId>sonar-process</artifactId>
- <name>SonarQube :: Process</name>
- <description>Library shared by all kinds of server processes: main, web and compute engine</description>
-
- <properties>
- <sonar.exclusions>target/generated-sources/**/*</sonar.exclusions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jul-to-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <!-- only if org.sonar.process.systeminfo HTTP server is being used -->
- <groupId>org.nanohttpd</groupId>
- <artifactId>nanohttpd</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <!-- only if org.sonar.process.systeminfo.protobuf classes are used -->
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/server/sonar-qa-util/build.gradle b/server/sonar-qa-util/build.gradle
new file mode 100644
index 00000000000..aab7d38eb88
--- /dev/null
+++ b/server/sonar-qa-util/build.gradle
@@ -0,0 +1,29 @@
+sonarqube {
+ skipProject = true
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'com.codeborne:selenide:4.8'
+ // required version 23.0 for selenide
+ compile 'com.google.guava:guava:23.0'
+ compile 'org.assertj:assertj-core'
+ compile 'org.sonarsource.orchestrator:sonar-orchestrator'
+ compile project(':sonar-ws')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+}
+
+artifactoryPublish.skip = false
+
+// Required for core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/server/sonar-qa-util/pom.xml b/server/sonar-qa-util/pom.xml
deleted file mode 100644
index 601b9c7b2c1..00000000000
--- a/server/sonar-qa-util/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>sonar-qa-util</artifactId>
- <name>SonarQube :: Utilities for QA Tests</name>
-
- <properties>
- <sonar.coverage.exclusions>src/main/java/**/*</sonar.coverage.exclusions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-ws</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.codeborne</groupId>
- <artifactId>selenide</artifactId>
- <version>4.8</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <!-- required for selenide -->
- <version>23.0</version>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.orchestrator</groupId>
- <artifactId>sonar-orchestrator</artifactId>
- <version>${orchestrator.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/SelenideConfig.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/SelenideConfig.java
index 30d8b84d573..65696d65689 100644
--- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/SelenideConfig.java
+++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/SelenideConfig.java
@@ -57,7 +57,7 @@ public class SelenideConfig {
Configuration.browser = browser.name();
Configuration.baseUrl = orchestrator.getServer().getUrl();
Configuration.timeout = 8_000;
- Configuration.reportsFolder = "target/screenshots";
+ Configuration.reportsFolder = "build/screenshots";
Configuration.screenshots = true;
Configuration.captureJavascriptErrors = true;
Configuration.savePageSource = true;
diff --git a/server/sonar-server/build.gradle b/server/sonar-server/build.gradle
new file mode 100644
index 00000000000..327e4a3ad86
--- /dev/null
+++ b/server/sonar-server/build.gradle
@@ -0,0 +1,96 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Server"
+ }
+}
+
+sourceSets {
+ test {
+ resources {
+ srcDirs += ['src/test/projects']
+ }
+ }
+}
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'ch.qos.logback:logback-access'
+ compile 'ch.qos.logback:logback-classic'
+ compile 'ch.qos.logback:logback-core'
+ compile 'commons-dbcp:commons-dbcp'
+ compile 'commons-dbutils:commons-dbutils'
+ compile 'com.googlecode.java-diff-utils:diffutils'
+ compile 'com.google.code.gson:gson'
+ compile 'com.google.protobuf:protobuf-java'
+ compile 'com.hazelcast:hazelcast-client'
+ compile 'io.jsonwebtoken:jjwt'
+ compile 'javax.xml.bind:jaxb-api'
+ compile 'org.apache.commons:commons-email'
+ compile 'org.apache.httpcomponents:httpclient'
+ compile 'org.apache.logging.log4j:log4j-api'
+ compile 'org.apache.tomcat.embed:tomcat-embed-core'
+ compile 'org.elasticsearch.client:transport'
+ compile 'org.picocontainer:picocontainer'
+ compile 'org.slf4j:jul-to-slf4j'
+ compile 'org.slf4j:slf4j-api'
+ compile 'org.sonarsource.update-center:sonar-update-center-common'
+
+ compile project(':server:sonar-db-dao')
+ compile project(':server:sonar-db-migration')
+ compile project(':server:sonar-plugin-bridge')
+ compile project(':server:sonar-process')
+ compile project(':sonar-core')
+ compile project(':sonar-scanner-protocol')
+ compile(project(':sonar-markdown')) {
+ // already shaded with sonar-plugin-api
+ exclude group: 'org.codehaus.sonar', module: 'sonar-channel'
+ }
+ compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compile project(':sonar-ws')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+ // not a transitive dep. At runtime lib/jdbc/h2 is used
+ compileOnly 'com.h2database:h2'
+
+ testCompile 'com.github.kevinsawicki:http-request'
+ testCompile 'com.github.tlrx:elasticsearch-test'
+ testCompile 'com.google.code.findbugs:jsr305'
+ testCompile 'com.h2database:h2'
+ testCompile 'com.squareup.okhttp3:mockwebserver'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'junit:junit'
+ testCompile 'org.apache.logging.log4j:log4j-api'
+ testCompile 'org.apache.logging.log4j:log4j-core'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.assertj:assertj-guava'
+ testCompile("org.elasticsearch.test:framework:${elasticsearchVersion}") {
+ // should be excluded to avoid ES go into "test mode" and require to run EsTester-based UTs with RandomizedRunner
+ exclude group: 'com.carrotsearch.randomizedtesting', module: 'randomizedtesting-runner'
+ exclude group: 'org.elasticsearch', module: 'securemock'
+ }
+ testCompile 'org.hamcrest:hamcrest-all'
+ testCompile 'org.mockito:mockito-core'
+ testCompile 'org.reflections:reflections'
+ testCompile 'org.subethamail:subethasmtp'
+ testCompile project(':server:sonar-db-testing')
+}
+
+task testJar(type: Jar) {
+ classifier = 'tests'
+ from sourceSets.test.output
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact testJar
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/server/sonar-server/pom.xml b/server/sonar-server/pom.xml
deleted file mode 100644
index c9b9bd499fb..00000000000
--- a/server/sonar-server/pom.xml
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>sonar-server</artifactId>
- <name>SonarQube :: Server</name>
-
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jul-to-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-access</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-core</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-dao</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-migration</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-scanner-protocol</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-markdown</artifactId>
- <exclusions>
- <exclusion>
- <!-- already shaded with sonar-plugin-api -->
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-channel</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-process</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <!-- not used at runtime -->
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-dependency-tree</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-common-artifact-filters</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-ws</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-bridge</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.update-center</groupId>
- <artifactId>sonar-update-center-common</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-dbutils</groupId>
- <artifactId>commons-dbutils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.googlecode.java-diff-utils</groupId>
- <artifactId>diffutils</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>org.picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-dbcp</groupId>
- <artifactId>commons-dbcp</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.2</version>
- </dependency>
- <dependency>
- <groupId>org.elasticsearch.client</groupId>
- <artifactId>transport</artifactId>
- <version>${elasticsearch.version}</version>
- </dependency>
- <dependency>
- <groupId>org.elasticsearch.test</groupId>
- <artifactId>framework</artifactId>
- <version>${elasticsearch.version}</version>
- <scope>test</scope>
- <exclusions>
- <!--should be excluded to avoid ES go into "test mode" and require to run EsTester-based UTs with RandomizedRunner-->
- <exclusion>
- <groupId>com.carrotsearch.randomizedtesting</groupId>
- <artifactId>randomizedtesting-runner</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.elasticsearch</groupId>
- <artifactId>securemock</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast-client</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>io.jsonwebtoken</groupId>
- <artifactId>jjwt</artifactId>
- </dependency>
-
- <!-- unit tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-guava</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <!-- TODO to be removed -->
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-db-testing</artifactId>
- <type>pom</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.github.tlrx</groupId>
- <artifactId>elasticsearch-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.github.kevinsawicki</groupId>
- <artifactId>http-request</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.reflections</groupId>
- <artifactId>reflections</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.subethamail</groupId>
- <artifactId>subethasmtp</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>mockwebserver</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>build.properties</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- <excludes>
- <exclude>build.properties</exclude>
- </excludes>
- </resource>
- </resources>
- <testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <filtering>false</filtering>
- </testResource>
- <testResource>
- <directory>src/test/projects</directory>
- <filtering>false</filtering>
- </testResource>
- </testResources>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>logback-test.xml</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <mainClass>org.sonar.server.app.App</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!--see https://discuss.elastic.co/t/migrate-elasticsearch-java-api-to-version-5-in-spring-io-platform-application/72661-->
- <classpathDependencyExcludes>
- <classpathDependencyExcludes>org.apache.logging.log4j:log4j-to-slf4j</classpathDependencyExcludes>
- </classpathDependencyExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/server/sonar-server/src/main/java/org/sonar/ce/log/CeLogging.java b/server/sonar-server/src/main/java/org/sonar/ce/log/CeLogging.java
index f9408af6976..b6569cdaf91 100644
--- a/server/sonar-server/src/main/java/org/sonar/ce/log/CeLogging.java
+++ b/server/sonar-server/src/main/java/org/sonar/ce/log/CeLogging.java
@@ -19,7 +19,7 @@
*/
package org.sonar.ce.log;
-import org.apache.log4j.MDC;
+import org.slf4j.MDC;
import org.sonar.ce.queue.CeTask;
public class CeLogging {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/EmbeddedTomcat.java b/server/sonar-server/src/main/java/org/sonar/server/app/EmbeddedTomcat.java
index 4992c82be62..0d53ec3bb5b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/app/EmbeddedTomcat.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/app/EmbeddedTomcat.java
@@ -61,6 +61,7 @@ class EmbeddedTomcat {
tomcat.start();
new TomcatStartupLogs(Loggers.get(getClass())).log(tomcat);
} catch (LifecycleException e) {
+ Loggers.get(EmbeddedTomcat.class).error("Fail to start web server", e);
Throwables.propagate(e);
}
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/EsClientProvider.java b/server/sonar-server/src/main/java/org/sonar/server/es/EsClientProvider.java
index ff85a78bac9..319bb38f0bf 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/es/EsClientProvider.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/es/EsClientProvider.java
@@ -32,7 +32,6 @@ import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.transport.TransportAddress;
-import org.elasticsearch.index.reindex.ReindexPlugin;
import org.elasticsearch.join.ParentJoinPlugin;
import org.elasticsearch.percolator.PercolatorPlugin;
import org.elasticsearch.transport.Netty4Plugin;
@@ -103,7 +102,7 @@ public class EsClientProvider extends ProviderAdapter {
static class MinimalTransportClient extends TransportClient {
MinimalTransportClient(Settings settings) {
- super(settings, unmodifiableList(Arrays.asList(Netty4Plugin.class, ReindexPlugin.class, PercolatorPlugin.class, ParentJoinPlugin.class)));
+ super(settings, unmodifiableList(Arrays.asList(Netty4Plugin.class, PercolatorPlugin.class, ParentJoinPlugin.class)));
}
@Override
diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle
new file mode 100644
index 00000000000..ee71411cf03
--- /dev/null
+++ b/server/sonar-web/build.gradle
@@ -0,0 +1,44 @@
+sonarqube {
+ properties {
+ property "sonar.projectName", "${projectTitle} :: Web"
+ property "sonar.sources", "src/main/js"
+ property "sonar.tests", "src/main/js"
+ property "sonar.test.inclusions", "src/main/js/**/__tests__/**"
+ property "sonar.exclusions", "src/main/js/libs/third-party/**/*,src/main/js/libs/require.js,src/main/js/**/__tests__/**"
+ }
+}
+
+apply plugin: 'com.moowork.node'
+apply plugin: 'war'
+
+configurations {
+ branding
+}
+dependencies {
+ branding 'com.sonarsource:sonarsource-branding:1.3.0.307@war'
+}
+task unzipBranding(type: Copy) {
+ into projectDir
+ from { zipTree(configurations.branding.singleFile) }
+ include '**/*.js'
+ include '**/*.svg'
+ includeEmptyDirs = false
+}
+
+node {
+ version = '8.5.0'
+ yarnVersion = '1.1.0'
+ download = true
+}
+
+yarn_run {
+ if (release) { dependsOn unzipBranding }
+ inputs.dir('scripts')
+ inputs.dir('src/main/js')
+ inputs.file('build.gradle')
+ outputs.dir('src/main/webapp')
+
+ args = ['build']
+}
+
+war.dependsOn yarn_run
diff --git a/server/sonar-web/pom.xml b/server/sonar-web/pom.xml
deleted file mode 100644
index 7f51af819f5..00000000000
--- a/server/sonar-web/pom.xml
+++ /dev/null
@@ -1,256 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>server</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>sonar-web</artifactId>
- <packaging>war</packaging>
- <name>SonarQube :: Web</name>
-
- <properties>
- <!-- self-analysis -->
- <sonar.sources>src/main/js</sonar.sources>
- <sonar.tests>src/main/js</sonar.tests>
- <sonar.test.inclusions>src/main/js/**/__tests__/**</sonar.test.inclusions>
- <sonar.exclusions>src/main/js/libs/third-party/**/*,src/main/js/libs/require.js,src/main/js/**/__tests__/**</sonar.exclusions>
- <yarn.script>build</yarn.script>
- </properties>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
-
- <plugins>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>${basedir}/src/main/webapp/deploy</directory>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>readme.txt</exclude>
- </excludes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/${project.build.finalName}/</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}/src/main/webapp</directory>
- <filtering>false</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy-generated-webapp</id>
- <!-- must be after the execution of grunt -->
- <phase>process-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
- <overwrite>true</overwrite>
- <resources>
- <resource>
- <directory>src/main/webapp/build</directory>
- <filtering>false</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.github.eirslett</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>install node and yarn</id>
- <goals>
- <goal>install-node-and-yarn</goal>
- </goals>
- <configuration>
- <nodeVersion>v8.5.0</nodeVersion>
- <yarnVersion>v1.1.0</yarnVersion>
- </configuration>
- </execution>
- <execution>
- <id>yarn install</id>
- <goals>
- <goal>yarn</goal>
- </goals>
- </execution>
- <execution>
- <phase>generate-resources</phase>
- <id>yarn run script</id>
- <goals>
- <goal>yarn</goal>
- </goals>
- <configuration>
- <arguments>run ${yarn.script}</arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <packagingExcludes>
- **/*.log,*.iml,WEB-INF/script/,WEB-INF/test/,javascripts/*-min.js,stylesheets/*-min.css,javascripts/tests/**/*,
- build/**,templates/**
- </packagingExcludes>
- <warSourceExcludes>
- js/**,css/**
- </warSourceExcludes>
- <archive>
- <manifestEntries>
- <Version>${project.version}</Version>
- <!-- ${buildNumber} is the Git revision. It's generated by the buildnumber-maven-plugin -->
- <Implementation-Build>${buildNumber}</Implementation-Build>
- <Build-Time>${timestamp}</Build-Time>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.mycila</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>src/main/webapp/**/*</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>release</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>${basedir}/node</directory>
- <includes>
- <include>**/*</include>
- </includes>
- </fileset>
- <fileset>
- <directory>${basedir}/node_modules</directory>
- <includes>
- <include>**/*</include>
- </includes>
- </fileset>
- <fileset>
- <directory>${basedir}/src/main/webapp/deploy</directory>
- <includes>
- <include>**/*</include>
- </includes>
- <excludes>
- <exclude>readme.txt</exclude>
- </excludes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-branding</id>
- <phase>initialize</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>com.sonarsource</groupId>
- <artifactId>sonarsource-branding</artifactId>
- <type>war</type>
- <overWrite>true</overWrite>
- <outputDirectory>${project.basedir}</outputDirectory>
- <includes>**/*.js,**/*.svg</includes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>empty-javadoc-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>javadoc</classifier>
- </configuration>
- </execution>
- <execution>
- <id>empty-sources-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>sources</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>com.sonarsource</groupId>
- <artifactId>sonarsource-branding</artifactId>
- <version>1.3.0.307</version>
- <type>war</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>dev</id>
- <properties>
- <yarn.script>build-fast</yarn.script>
- </properties>
- </profile>
- </profiles>
-
-</project>
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 00000000000..0009ccb1366
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,61 @@
+rootProject.name = 'sonarqube'
+
+include 'plugins:sonar-xoo-plugin'
+
+include 'server:sonar-ce'
+include 'server:sonar-db-testing'
+include 'server:sonar-db-core'
+include 'server:sonar-db-dao'
+include 'server:sonar-db-migration'
+include 'server:sonar-main'
+include 'server:sonar-plugin-bridge'
+include 'server:sonar-process'
+include 'server:sonar-qa-util'
+include 'server:sonar-server'
+include 'server:sonar-web'
+
+include 'sonar-application'
+include 'sonar-check-api'
+include 'sonar-core'
+include 'sonar-duplications'
+include 'sonar-home'
+include 'sonar-markdown'
+include 'sonar-plugin-api'
+include 'sonar-plugin-api-deps'
+include 'sonar-scanner-engine'
+include 'sonar-scanner-engine-shaded'
+include 'sonar-scanner-protocol'
+include 'sonar-testing-harness'
+include 'sonar-ws'
+include 'sonar-ws-generator'
+
+include 'tests:plugins:access-secured-props-plugin'
+include 'tests:plugins:backdating-customplugin'
+include 'tests:plugins:backdating-plugin-v1'
+include 'tests:plugins:backdating-plugin-v2'
+include 'tests:plugins:base-auth-plugin'
+include 'tests:plugins:batch-plugin'
+include 'tests:plugins:extension-lifecycle-plugin'
+include 'tests:plugins:fake-billing-plugin'
+include 'tests:plugins:fake-governance-plugin'
+include 'tests:plugins:foo-plugin-v1'
+include 'tests:plugins:foo-plugin-v2'
+include 'tests:plugins:global-property-change-plugin'
+include 'tests:plugins:issue-filter-plugin'
+include 'tests:plugins:l10n-fr-pack'
+include 'tests:plugins:license-plugin'
+include 'tests:plugins:oauth2-auth-plugin'
+include 'tests:plugins:posttask-plugin'
+include 'tests:plugins:project-builder-plugin'
+include 'tests:plugins:property-relocation-plugin'
+include 'tests:plugins:property-sets-plugin'
+include 'tests:plugins:security-plugin'
+include 'tests:plugins:server-plugin'
+include 'tests:plugins:settings-encryption-plugin'
+include 'tests:plugins:settings-plugin'
+include 'tests:plugins:sonar-fake-plugin'
+include 'tests:plugins:sonar-subcategories-plugin'
+include 'tests:plugins:ui-extensions-plugin'
+include 'tests:plugins:wait-at-platform-level4-plugin'
+include 'tests:plugins:ws-plugin'
+include 'tests'
diff --git a/sonar-application/assembly-common.xml b/sonar-application/assembly-common.xml
deleted file mode 100644
index 8d85b77149b..00000000000
--- a/sonar-application/assembly-common.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<assembly>
- <id>common-lib-dir</id>
- <formats>
- <format>dir</format>
- </formats>
- <baseDirectory>/</baseDirectory>
- <dependencySets>
-
- <dependencySet>
- <outputDirectory>/</outputDirectory>
- <useTransitiveFiltering>true</useTransitiveFiltering>
- <useProjectArtifact>false</useProjectArtifact>
- <scope>runtime</scope>
- </dependencySet>
-
- </dependencySets>
-
-</assembly>
diff --git a/sonar-application/assembly.xml b/sonar-application/assembly.xml
deleted file mode 100644
index ccbf0a97315..00000000000
--- a/sonar-application/assembly.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<assembly>
- <id>distribution</id>
- <formats>
- <format>${assembly.format}</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <dependencySets>
- <!-- Libraries -->
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <useTransitiveFiltering>false</useTransitiveFiltering>
- <useProjectArtifact>true</useProjectArtifact>
- <includes>
- <include>org.sonarsource.sonarqube:sonar-application</include>
- </includes>
- </dependencySet>
-
- <dependencySet>
- <outputDirectory>lib/jsw</outputDirectory>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <useTransitiveFiltering>false</useTransitiveFiltering>
- <useProjectArtifact>false</useProjectArtifact>
- <includes>
- <include>tanukisoft:wrapper</include>
- </includes>
- <scope>provided</scope>
- </dependencySet>
-
- <dependencySet>
- <outputDirectory>lib/server</outputDirectory>
- <useProjectArtifact>false</useProjectArtifact>
- <useTransitiveDependencies>true</useTransitiveDependencies>
- <useTransitiveFiltering>true</useTransitiveFiltering>
- <includes>
- <include>org.sonarsource.sonarqube:sonar-server</include>
- </includes>
- <scope>provided</scope>
- </dependencySet>
-
- <dependencySet>
- <outputDirectory>lib/ce</outputDirectory>
- <useProjectArtifact>false</useProjectArtifact>
- <useTransitiveDependencies>true</useTransitiveDependencies>
- <useTransitiveFiltering>true</useTransitiveFiltering>
- <includes>
- <include>org.sonarsource.sonarqube:sonar-ce</include>
- </includes>
- <scope>provided</scope>
- </dependencySet>
-
- <!-- Scanner Engine that is returned by batch/index WS -->
- <dependencySet>
- <outputDirectory>lib/scanner</outputDirectory>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <includes>
- <include>org.sonarsource.sonarqube:sonar-scanner-engine-shaded</include>
- </includes>
- <scope>provided</scope>
- </dependencySet>
- <!-- Plugins -->
- <dependencySet>
- <outputDirectory>lib/bundled-plugins</outputDirectory>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <includes>
- <include>org.sonarsource.*:sonar-*-plugin</include>
- </includes>
- <scope>provided</scope>
- </dependencySet>
- <!-- Server -->
- <dependencySet>
- <outputDirectory>web</outputDirectory>
- <includes>
- <include>org.sonarsource.sonarqube:sonar-web</include>
- </includes>
- <unpack>true</unpack>
- <scope>provided</scope>
- </dependencySet>
- <!-- JDBC drivers -->
- <dependencySet>
- <outputDirectory>lib/jdbc/mssql/</outputDirectory>
- <includes>
- <include>com.microsoft.sqlserver:mssql-jdbc</include>
- </includes>
- <unpack>false</unpack>
- <scope>provided</scope>
- </dependencySet>
- <dependencySet>
- <outputDirectory>lib/jdbc/mysql/</outputDirectory>
- <includes>
- <include>mysql:mysql-connector-java</include>
- </includes>
- <unpack>false</unpack>
- <scope>provided</scope>
- </dependencySet>
- <dependencySet>
- <outputDirectory>lib/jdbc/postgresql/</outputDirectory>
- <includes>
- <include>org.postgresql:postgresql</include>
- </includes>
- <unpack>false</unpack>
- <scope>provided</scope>
- </dependencySet>
- <dependencySet>
- <outputDirectory>lib/jdbc/h2/</outputDirectory>
- <includes>
- <include>com.h2database:h2</include>
- </includes>
- <unpack>false</unpack>
- <scope>provided</scope>
- </dependencySet>
- </dependencySets>
-
- <fileSets>
- <!-- common directory -->
- <fileSet>
- <directory>target/common</directory>
- <outputDirectory>lib/common</outputDirectory>
- </fileSet>
- <!-- wrapper binaries -->
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>bin/*/lib/*.so</include>
- <include>bin/*/lib/*.jnilib</include>
- <include>bin/*/lib/*.dll</include>
- <include>bin/*/wrapper</include>
- <include>bin/*/wrapper.exe</include>
- <include>elasticsearch/bin/elasticsearch</include>
- <include>elasticsearch/bin/elasticsearch.bat</include>
- </includes>
- <fileMode>0755</fileMode>
- </fileSet>
- <!-- Configuration Files -->
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>conf/**</include>
- </includes>
- <!-- See SONAR-2580 - for better readability of configuration files on Windows: -->
- <lineEnding>dos</lineEnding>
- <fileMode>0644</fileMode>
- </fileSet>
- <!-- Windows Scripts -->
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>**/*.bat</include>
- <include>**/*.cmd</include>
- </includes>
- <lineEnding>dos</lineEnding>
- <fileMode>0644</fileMode>
- </fileSet>
- <!-- Linux Scripts -->
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory></outputDirectory>
- <includes>
- <include>**/*.sh</include>
- <include>**/ant</include>
- <include>**/antRun</include>
- </includes>
- <lineEnding>unix</lineEnding>
- <fileMode>0755</fileMode>
- </fileSet>
- <!-- Other stuff -->
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory></outputDirectory>
- <excludes>
- <exclude>conf/**</exclude>
- <exclude>**/*.bat</exclude>
- <exclude>**/*.cmd</exclude>
- <exclude>**/*.sh</exclude>
- <exclude>**/ant</exclude>
- <exclude>**/antRun</exclude>
- <!--exclude ES modules by default in the distribution that we don't use-->
- <exclude>elasticsearch/modules/lang-expression/</exclude>
- <exclude>elasticsearch/modules/lang-groovy/</exclude>
- <exclude>elasticsearch/modules/lang-mustache/</exclude>
- <exclude>elasticsearch/modules/lang-painless/</exclude>
- <exclude>elasticsearch/modules/transport-netty3/</exclude>
- </excludes>
- <fileMode>0644</fileMode>
- </fileSet>
- <!-- Empty directories -->
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory>extensions/jdbc-driver/oracle/</outputDirectory>
- <excludes>
- <exclude>**/*</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory>logs/</outputDirectory>
- <excludes>
- <exclude>**/*</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>src/main/assembly</directory>
- <outputDirectory>elasticsearch/plugins</outputDirectory>
- <excludes>
- <exclude>*/**</exclude>
- </excludes>
- </fileSet>
- </fileSets>
-</assembly>
diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle
new file mode 100644
index 00000000000..bb8b58b74dc
--- /dev/null
+++ b/sonar-application/build.gradle
@@ -0,0 +1,148 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Application"
+ }
+}
+
+configurations {
+ ce
+ jsw
+ scanner
+ server
+ webapp
+ jdbc_mssql {
+ transitive = false
+ }
+ jdbc_mysql {
+ transitive = false
+ }
+ jdbc_postgresql {
+ transitive = false
+ }
+ jdbc_h2 {
+ transitive = false
+ }
+ bundledPlugin {
+ transitive = false
+ }
+}
+
+dependencies {
+ compile 'org.elasticsearch.client:transport'
+ compile project(':server:sonar-main')
+ compile project(':server:sonar-process')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ ce project(':server:sonar-ce')
+ jsw 'tanukisoft:wrapper:3.2.3'
+ scanner project(path: ':sonar-scanner-engine-shaded', configuration: 'shadow')
+ server project(':server:sonar-server')
+ webapp project(path: ':server:sonar-web', configuration: 'archives')
+
+ jdbc_mssql 'com.microsoft.sqlserver:mssql-jdbc'
+ jdbc_mysql 'mysql:mysql-connector-java'
+ jdbc_postgresql 'org.postgresql:postgresql'
+ jdbc_h2 'com.h2database:h2'
+
+ bundledPlugin 'org.sonarsource.java:sonar-java-plugin:5.1.0.13090@jar'
+ bundledPlugin 'org.sonarsource.javascript:sonar-javascript-plugin:4.0.0.5862@jar'
+ bundledPlugin 'org.sonarsource.dotnet:sonar-csharp-plugin:6.7.1.4347@jar'
+ bundledPlugin 'org.sonarsource.scm.git:sonar-scm-git-plugin:1.4.0.1037@jar'
+ bundledPlugin 'org.sonarsource.scm.svn:sonar-scm-svn-plugin:1.7.0.1017@jar'
+ bundledPlugin 'org.sonarsource.php:sonar-php-plugin:2.12.1.3018@jar'
+ bundledPlugin 'org.sonarsource.python:sonar-python-plugin:1.9.0.2010@jar'
+ bundledPlugin 'org.sonarsource.flex:sonar-flex-plugin:2.3@jar'
+ bundledPlugin 'org.sonarsource.xml:sonar-xml-plugin:1.4.3.1027@jar'
+ bundledPlugin 'org.sonarsource.typescript:sonar-typescript-plugin:1.5.0.2122@jar'
+
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Class-Path': configurations.compile.collect { "common/${it.getName()}" }.join(' '),
+ 'Main-Class': 'org.sonar.application.App'
+ )
+ }
+}
+
+task zip(type: Zip) {
+ duplicatesStrategy DuplicatesStrategy.EXCLUDE
+ def archiveDir = "sonarqube-$version"
+ into("${archiveDir}/") {
+ from file('src/main/assembly')
+ exclude 'elasticsearch/modules/lang-expression/**'
+ exclude 'elasticsearch/modules/lang-groovy/**'
+ exclude 'elasticsearch/modules/lang-mustache/**'
+ exclude 'elasticsearch/modules/lang-painless/**'
+ exclude 'elasticsearch/modules/transport-netty3/**'
+ }
+ // Create the empty dir (plugins) required by elasticsearch
+ into("${archiveDir}/elasticsearch/") {
+ from "$buildDir/elasticsearch"
+ }
+ into("${archiveDir}/lib/") {
+ from jar
+ }
+ into("${archiveDir}/lib/bundled-plugins/") {
+ from configurations.bundledPlugin
+ }
+ into("${archiveDir}/lib/jsw/") {
+ from configurations.jsw
+ }
+ into("${archiveDir}/lib/scanner/") {
+ from configurations.scanner
+ }
+ into("${archiveDir}/lib/common/") {
+ from configurations.ce + configurations.server + configurations.compile
+ }
+ dependsOn configurations.webapp
+ into("${archiveDir}/web/") {
+ from {
+ configurations.webapp.files.collect { zipTree(it) }
+ }
+ }
+ into("${archiveDir}/lib/jdbc/mssql/") {
+ from configurations.jdbc_mssql
+ }
+ into("${archiveDir}/lib/jdbc/mysql/") {
+ from configurations.jdbc_mysql
+ }
+ into("${archiveDir}/lib/jdbc/postgresql/") {
+ from configurations.jdbc_postgresql
+ }
+ into("${archiveDir}/lib/jdbc/h2/") {
+ from configurations.jdbc_h2
+ }
+}
+// Create the empty dir required by elasticsearch
+zip.doFirst {
+ new File(buildDir, 'elasticsearch/plugins').mkdirs()
+}
+// Check the size of the archive
+zip.doLast {
+ def minLength = 155000000
+ def maxLength = 170000000
+ def length = new File(distsDir, archiveName).length()
+ if (length < minLength)
+ throw new GradleException("$archiveName size ($length) too small. Min is $minLength")
+ if (length > maxLength)
+ throw new GradleException("$distsDir/$archiveName size ($length) too large. Max is $maxLength")
+}
+
+assemble.dependsOn zip
+
+artifactoryPublish.skip = false
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifact zip
+ }
+ }
+}
diff --git a/sonar-application/pom.xml b/sonar-application/pom.xml
deleted file mode 100644
index f599fb98c6a..00000000000
--- a/sonar-application/pom.xml
+++ /dev/null
@@ -1,271 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-application</artifactId>
- <packaging>jar</packaging>
- <name>SonarQube :: Application</name>
- <description>Package the standalone distribution</description>
-
- <properties>
- <assembly.recompressZippedFiles>true</assembly.recompressZippedFiles>
- <assembly.format>zip</assembly.format>
- <checksum.failOnError>true</checksum.failOnError>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-process</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-main</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!--must declare this dependency of sonar-process-monitor here, again,-->
- <!--to allow copying it and its dependencies into lib/common-->
- <dependency>
- <groupId>org.elasticsearch.client</groupId>
- <artifactId>transport</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-server</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-ce</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-scanner-engine-shaded</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-web</artifactId>
- <version>${project.version}</version>
- <type>war</type>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>mssql-jdbc</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- default plugins -->
- <dependency>
- <groupId>org.sonarsource.java</groupId>
- <artifactId>sonar-java-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.javascript</groupId>
- <artifactId>sonar-javascript-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.dotnet</groupId>
- <artifactId>sonar-csharp-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.flex</groupId>
- <artifactId>sonar-flex-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.scm.git</groupId>
- <artifactId>sonar-scm-git-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.scm.svn</groupId>
- <artifactId>sonar-scm-svn-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.php</groupId>
- <artifactId>sonar-php-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.python</groupId>
- <artifactId>sonar-python-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.typescript</groupId>
- <artifactId>sonar-typescript-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.xml</groupId>
- <artifactId>sonar-xml-plugin</artifactId>
- <type>sonar-plugin</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <!-- do not upgrade because of licensing change -->
- <groupId>tanukisoft</groupId>
- <artifactId>wrapper</artifactId>
- <version>3.2.3</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <index>true</index>
- <manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>common</classpathPrefix>
- <mainClass>org.sonar.application.App</mainClass>
- </manifest>
- <manifestEntries>
- <mode>distribution</mode>
- <url>${project.url}</url>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>assemble-common-lib-dir</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <finalName>common</finalName>
- <descriptors>
- <descriptor>assembly-common.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- <execution>
- <id>assemble-distribution-zip</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <finalName>sonarqube-${project.version}</finalName>
- <descriptors>
- <descriptor>assembly.xml</descriptor>
- </descriptors>
- <recompressZippedFiles>${assembly.recompressZippedFiles}</recompressZippedFiles>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-distribution-size</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <phase>verify</phase>
- <configuration>
- <rules>
- <requireFilesSize>
- <minsize>155000000</minsize>
- <maxsize>170000000</maxsize>
- <files>
- <file>${project.build.directory}/sonarqube-${project.version}.zip</file>
- </files>
- </requireFilesSize>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>dev</id>
- <properties>
- <assembly.recompressZippedFiles>false</assembly.recompressZippedFiles>
- </properties>
- </profile>
- </profiles>
-
-</project>
diff --git a/sonar-application/src/main/assembly/logs/README.txt b/sonar-application/src/main/assembly/logs/README.txt
new file mode 100644
index 00000000000..5608b3348d8
--- /dev/null
+++ b/sonar-application/src/main/assembly/logs/README.txt
@@ -0,0 +1 @@
+This directory contains log files. See advanced configuration in conf/sonar.properties.
diff --git a/sonar-check-api/build.gradle b/sonar-check-api/build.gradle
new file mode 100644
index 00000000000..c7749e3dd38
--- /dev/null
+++ b/sonar-check-api/build.gradle
@@ -0,0 +1,11 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Check API"
+ }
+}
+
+dependencies {
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'junit:junit'
+}
diff --git a/sonar-check-api/pom.xml b/sonar-check-api/pom.xml
deleted file mode 100644
index 76cc534f50f..00000000000
--- a/sonar-check-api/pom.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>sonar-check-api</artifactId>
- <name>SonarQube :: Check API</name>
- <description>Check API</description>
-
- <dependencies>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/sonar-core/build.gradle b/sonar-core/build.gradle
new file mode 100644
index 00000000000..e9cd948163e
--- /dev/null
+++ b/sonar-core/build.gradle
@@ -0,0 +1,53 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Core"
+ }
+}
+
+configurations {
+ includeInResources
+}
+
+dependencies {
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compile 'commons-codec:commons-codec'
+ compile 'org.apache.commons:commons-csv'
+ compile 'org.picocontainer:picocontainer'
+ compile 'com.google.protobuf:protobuf-java'
+ compile 'org.codehaus.sonar:sonar-classloader'
+ compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compile 'org.sonarsource.update-center:sonar-update-center-common'
+ compile 'org.slf4j:slf4j-api'
+ compile 'ch.qos.logback:logback-classic'
+ compile 'ch.qos.logback:logback-core'
+
+ includeInResources project(path: ':sonar-plugin-api-deps', configuration: 'shadow')
+
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+ testCompile 'org.simpleframework:simple'
+ testCompileOnly 'com.google.code.findbugs:jsr305'
+}
+
+// sonar-plugin-api.jar is copied into target JAR file
+processResources {
+ into('/') {
+ from configurations.includeInResources
+ rename '(.*)-' + project.version + '-all.jar', '$1.jar'
+ }
+}
+
+// Used by sonar-db-core to run DB Unit Tests
+artifactoryPublish.skip = false
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-core/pom.xml b/sonar-core/pom.xml
deleted file mode 100644
index a0e5e0af6ac..00000000000
--- a/sonar-core/pom.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-core</artifactId>
-
- <name>SonarQube :: Core</name>
- <description>Library shared by analyzer and server</description>
-
- <properties>
- <sonar.exclusions>target/generated-sources/**/*,target/generated-test-sources/**/*</sonar.exclusions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-csv</artifactId>
- </dependency>
- <dependency>
- <groupId>org.picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-classloader</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.update-center</groupId>
- <artifactId>sonar-update-center-common</artifactId>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- </dependency>
-
- <dependency>
- <!-- sonar-api-deps.jar is copied into target JAR file -->
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api-deps</artifactId>
- <version>${project.version}</version>
- <optional>true</optional>
- <scope>runtime</scope>
- </dependency>
-
-
- <!-- tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.simpleframework</groupId>
- <artifactId>simple</artifactId>
- <version>4.1.21</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.basepom.maven</groupId>
- <artifactId>duplicate-finder-maven-plugin</artifactId>
- <configuration>
- <ignoredDependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api-deps</artifactId>
- </dependency>
- </ignoredDependencies>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-deprecated-api-deps</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api-deps</artifactId>
- <destFileName>sonar-plugin-api-deps.jar</destFileName>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.outputDirectory}</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sonar-duplications/build.gradle b/sonar-duplications/build.gradle
new file mode 100644
index 00000000000..540f457de8f
--- /dev/null
+++ b/sonar-duplications/build.gradle
@@ -0,0 +1,18 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Duplications"
+ }
+}
+
+dependencies {
+ compile 'org.codehaus.sonar:sonar-channel'
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'ch.qos.logback:logback-classic'
+ testCompile 'commons-io:commons-io'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile 'pmd:pmd:4.3'
+}
diff --git a/sonar-duplications/pom.xml b/sonar-duplications/pom.xml
deleted file mode 100644
index 8c7d106fb8a..00000000000
--- a/sonar-duplications/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-duplications</artifactId>
-
- <name>SonarQube :: Duplications</name>
- <description>Detect duplicated code</description>
-
- <properties>
- <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-channel</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>pmd</groupId>
- <artifactId>pmd</artifactId>
- <version>4.3</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/sonar-home/build.gradle b/sonar-home/build.gradle
new file mode 100644
index 00000000000..a367fdd6c35
--- /dev/null
+++ b/sonar-home/build.gradle
@@ -0,0 +1,28 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Home"
+ }
+}
+
+dependencies {
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'commons-codec:commons-codec'
+ testCompile 'commons-io:commons-io'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-home/pom.xml b/sonar-home/pom.xml
deleted file mode 100644
index 658a04347bf..00000000000
--- a/sonar-home/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-home</artifactId>
-
- <name>SonarQube :: Home</name>
- <description>Access the user home directory that contains cache of files</description>
-
- <dependencies>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <!-- used to compare results -->
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-</project>
diff --git a/sonar-markdown/build.gradle b/sonar-markdown/build.gradle
new file mode 100644
index 00000000000..28282eadad5
--- /dev/null
+++ b/sonar-markdown/build.gradle
@@ -0,0 +1,28 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Markdown"
+ }
+}
+
+dependencies {
+ compile 'commons-lang:commons-lang'
+ compile 'org.codehaus.sonar:sonar-channel'
+ compile 'org.slf4j:slf4j-api'
+
+ testCompile 'ch.qos.logback:logback-classic'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-markdown/pom.xml b/sonar-markdown/pom.xml
deleted file mode 100644
index d02542ac8be..00000000000
--- a/sonar-markdown/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <artifactId>sonar-markdown</artifactId>
- <name>SonarQube :: Markdown</name>
-
- <dependencies>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-channel</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/sonar-plugin-api-deps/build.gradle b/sonar-plugin-api-deps/build.gradle
new file mode 100644
index 00000000000..0c99ac23fb6
--- /dev/null
+++ b/sonar-plugin-api-deps/build.gradle
@@ -0,0 +1,39 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Plugin API Dependencies"
+ }
+}
+
+apply plugin: 'com.github.johnrengelman.shadow'
+
+dependencies {
+ // Versions must not be changed and overridden from root build.gradle (see dependencyManagement section).
+ // These are the versions defined in SQ 5.1
+ compile 'com.google.code.gson:gson:2.3.1'
+ compile 'com.google.guava:guava:10.0.1'
+ compile 'commons-beanutils:commons-beanutils:1.9.3'
+ compile 'commons-codec:commons-codec:1.8'
+ compile 'commons-collections:commons-collections:3.2.2'
+ compile 'org.apache.commons:commons-email:1.3.2'
+ compile 'commons-io:commons-io:2.4'
+ compile 'commons-lang:commons-lang:2.6'
+ compile('dom4j:dom4j:1.6.1') {
+ exclude group: 'xml-apis'
+ }
+ compile 'org.picocontainer:picocontainer:2.14.3'
+ compile 'org.slf4j:slf4j-api:1.7.10'
+ compile 'ch.qos.logback:logback-classic:1.1.2'
+ compile 'ch.qos.logback:logback-core:1.1.2'
+ compile('org.apache.maven:maven-core:3.0.5') {
+ exclude group: 'classworlds', module: 'classworlds'
+ exclude group: 'org.sonatype.sisu', module: 'sisu-guava'
+ }
+ compile 'org.apache.maven:maven-artifact:3.0.5'
+ compile('org.codehaus.sonar:sonar-squid:4.1') {
+ exclude group: 'org.codehaus.sonar', module: 'sonar-check-api'
+ }
+ compile('org.codehaus.sonar:sonar-java-api:5.1') {
+ exclude group: 'org.codehaus.sonar', module: 'sonar-deprecated'
+ exclude group: 'org.codehaus.sonar', module: 'sonar-plugin-api'
+ }
+}
diff --git a/sonar-plugin-api-deps/pom.xml b/sonar-plugin-api-deps/pom.xml
deleted file mode 100644
index 5576fb917ee..00000000000
--- a/sonar-plugin-api-deps/pom.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-plugin-api-deps</artifactId>
-
- <name>SonarQube :: Plugin API Dependencies</name>
- <description>Deprecated transitive dependencies of sonar-plugin-api</description>
-
- <properties>
- <maven.deploy.skip>true</maven.deploy.skip>
- </properties>
-
- <dependencies>
-
- <!--
- Versions must not be changed and overridden from parent pom. These are
- the versions defined in SQ 5.1
- -->
-
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.3.1</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>10.0.1</version>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.9.3</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.8</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- <version>1.3.2</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
- <dependency>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- <version>1.4.01</version>
- </dependency>
- <dependency>
- <groupId>org.picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- <version>2.14.3</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.10</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.1.2</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <version>1.1.2</version>
- </dependency>
- <!-- Needed by old versions of Java plugin (JavaClasspath) -->
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
- <version>3.0.5</version>
- <exclusions>
- <exclusion>
- <!-- See SONAR-2455 -->
- <groupId>classworlds</groupId>
- <artifactId>classworlds</artifactId>
- </exclusion>
- <exclusion>
- <!-- this fork conflicts with google's guava -->
- <groupId>org.sonatype.sisu</groupId>
- <artifactId>sisu-guava</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-artifact</artifactId>
- <version>3.0.5</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-squid</artifactId>
- <version>4.1</version>
- <exclusions>
- <exclusion>
- <!--
- Provided at runtime by sonar-plugin-api.
- Do not use transitive version 4.1 but the current version.
- -->
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-check-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-java-api</artifactId>
- <version>5.1</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-deprecated</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <minimizeJar>false</minimizeJar>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>empty-javadoc-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>javadoc</classifier>
- </configuration>
- </execution>
- <execution>
- <id>empty-sources-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>sources</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <!--
- This module contains deprecated dependencies (containing vulnerability issues) for plugins built for SonarQube < 5.2
- It will be removed for 7.0
- -->
- <profile>
- <!--
- check if maven dependencies have vulnerabilities listed in CVE
- Standalone command: mvn org.owasp:dependency-check-maven:check
- See http://jeremylong.github.io/DependencyCheck
- -->
- <id>securityCheck</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.owasp</groupId>
- <artifactId>dependency-check-maven</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- <configuration>
- <skip>true</skip>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/sonar-plugin-api/build.gradle b/sonar-plugin-api/build.gradle
new file mode 100644
index 00000000000..8bf8e28798b
--- /dev/null
+++ b/sonar-plugin-api/build.gradle
@@ -0,0 +1,82 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Plugin API"
+ }
+}
+
+apply plugin: 'com.github.johnrengelman.shadow'
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'commons-codec:commons-codec'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compile 'com.google.code.gson:gson'
+ compile 'com.google.guava:guava'
+
+ // shaded, but not relocated
+ compile project(':sonar-check-api')
+ compile(project(':sonar-duplications')) {
+ exclude group: 'org.slf4', module: 'slf4j-api'
+ }
+
+ shadow 'org.codehaus.staxmate:staxmate'
+ shadow 'org.codehaus.woodstox:stax2-api'
+ shadow 'org.codehaus.woodstox:woodstox-core-lgpl'
+
+ compileOnly 'ch.qos.logback:logback-classic'
+ compileOnly 'ch.qos.logback:logback-core'
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly 'javax.servlet:javax.servlet-api'
+ compileOnly 'junit:junit'
+ compileOnly 'org.slf4j:slf4j-api'
+
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+}
+
+sourceSets {
+ // Make the compileOnly dependencies available when compiling/running tests
+ test.compileClasspath += configurations.compileOnly + configurations.shadow
+ test.runtimeClasspath += configurations.compileOnly + configurations.shadow
+}
+
+def on3Digits(version) {
+ def projectversion3digits = version - ~/-\w+/
+ projectversion3digits = projectversion3digits.tokenize('.').plus(0).take(3).join('.')
+}
+
+import org.apache.tools.ant.filters.ReplaceTokens
+processResources {
+ filter ReplaceTokens, tokens: [
+ // The build version is composed of 4 fields, including the semantic version and the build number provided by Travis.
+ 'project.buildVersion': project.version.endsWith('SNAPSHOT') ? project.version : on3Digits(project.version) + '.' + System.getProperty("buildNumber"),
+ 'project.version.3digits': project.version.endsWith('SNAPSHOT') ? project.version : on3Digits(project.version)
+ ]
+}
+
+shadowJar {
+ configurations = [project.configurations.default]
+ relocate('com.google', 'org.sonar.api.internal.google')
+ relocate('org.apache.commons', 'org.sonar.api.internal.apachecommons')
+ dependencies {
+ exclude(dependency('org.codehaus.woodstox:woodstox-core-lgpl'))
+ exclude(dependency('org.codehaus.woodstox:stax2-api'))
+ exclude(dependency('org.codehaus.staxmate:staxmate'))
+ }
+}
+
+artifactoryPublish.skip = false
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifact source: shadowJar, classifier: null
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-plugin-api/pom.xml b/sonar-plugin-api/pom.xml
deleted file mode 100644
index ab8dc7cef4f..00000000000
--- a/sonar-plugin-api/pom.xml
+++ /dev/null
@@ -1,282 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-plugin-api</artifactId>
- <packaging>jar</packaging>
-
- <name>SonarQube :: Plugin API</name>
-
- <properties>
- <!--
- version as stored in JAR and displayed in webapp. It is
- overridden on Travis when replacing SNAPSHOT version by
- build unique version, for instance "6.3.0.12345".
- -->
- <buildVersion>${project.version}</buildVersion>
-
- <!--
- a truncated version on three fields is kept for backward-compatibility
- with scanners
- -->
- <buildVersionOnThreeFields>${buildVersion}</buildVersionOnThreeFields>
- </properties>
-
- <dependencies>
-
- <!--
- The following artifacts are shaded and relocated in an internal package.
- They are not visible by plugins
- -->
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
-
- <!--
- The following artifacts are shaded but not relocated. They
- are provided at runtime, so plugins can use them but
- can not change their version.
- Long-term target is to remove them from API. They should be
- embedded by plugins.
- -->
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-check-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-duplications</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!--
- Transitive dependencies available at runtime. They are not shaded with API
- as they are not managed by SonarSource. Versions should not be
- overridden by plugins though.
- -->
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-lgpl</artifactId>
- <exclusions>
- <exclusion>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>stax2-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.staxmate</groupId>
- <artifactId>staxmate</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <optional>true</optional>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
-
- <!-- unit tests -->
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <minimizeJar>true</minimizeJar>
- <createDependencyReducedPom>true</createDependencyReducedPom>
- <artifactSet>
- <excludes>
- <exclude>org.codehaus.woodstox:woodstox-core-lgpl</exclude>
- <exclude>org.codehaus.woodstox:stax2-api</exclude>
- <exclude>org.codehaus.staxmate:staxmate</exclude>
- </excludes>
- </artifactSet>
- <filters>
- <!-- The following deps are used transitively, so make sure they are not minimized -->
- <filter>
- <artifact>${project.groupId}:sonar-duplications</artifact>
- <includes>
- <include>**</include>
- </includes>
- </filter>
- <filter>
- <artifact>org.codehaus.sonar:sonar-channel</artifact>
- <includes>
- <include>**</include>
- </includes>
- </filter>
- <filter>
- <artifact>org.sonarsource.sonarqube:sonar-check-api</artifact>
- <includes>
- <include>**</include>
- </includes>
- </filter>
- </filters>
- <relocations>
- <relocation>
- <pattern>com.google</pattern>
- <shadedPattern>org.sonar.api.internal.google</shadedPattern>
- </relocation>
- <relocation>
- <pattern>org.apache.commons</pattern>
- <shadedPattern>org.sonar.api.internal.apachecommons</shadedPattern>
- </relocation>
- </relocations>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>logback-test.xml</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.github.genthaler</groupId>
- <artifactId>beanshell-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>compute-version-on-three-fields</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <script>
- <![CDATA[
- if (! "${buildVersion}".endsWith("-SNAPSHOT")) {
- // example: "6.3.0.1234". To be backward-compatible with scanners, only "6.3.0" must be kept
- fields = "${buildVersion}".split("\\.");
- sj = new StringJoiner(".");
- i = 0;
- for (String field : fields) {
- if (i == 3) {
- break;
- }
- sj.add(field);
- ++i;
- }
- project.getProperties().setProperty("buildVersionOnThreeFields", sj.toString());
- }
- ]]>
- </script>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <!-- Used to resolve variables in files sq-version.txt and sonar-api-version.txt -->
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </build>
-
-</project>
diff --git a/sonar-plugin-api/src/main/resources/sonar-api-version.txt b/sonar-plugin-api/src/main/resources/sonar-api-version.txt
index 6b7ce460f25..d2193c1c60f 100644
--- a/sonar-plugin-api/src/main/resources/sonar-api-version.txt
+++ b/sonar-plugin-api/src/main/resources/sonar-api-version.txt
@@ -1 +1 @@
-${buildVersion}
+@project.buildVersion@ \ No newline at end of file
diff --git a/sonar-plugin-api/src/main/resources/sq-version.txt b/sonar-plugin-api/src/main/resources/sq-version.txt
index ab8c87a30ad..b3f131da385 100644
--- a/sonar-plugin-api/src/main/resources/sq-version.txt
+++ b/sonar-plugin-api/src/main/resources/sq-version.txt
@@ -1 +1 @@
-${buildVersionOnThreeFields}
+@project.version.3digits@ \ No newline at end of file
diff --git a/sonar-scanner-engine-shaded/build.gradle b/sonar-scanner-engine-shaded/build.gradle
new file mode 100644
index 00000000000..9d32f9d396c
--- /dev/null
+++ b/sonar-scanner-engine-shaded/build.gradle
@@ -0,0 +1,11 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Scanner Engine Shaded"
+ }
+}
+
+apply plugin: 'com.github.johnrengelman.shadow'
+
+dependencies {
+ compile project(':sonar-scanner-engine')
+}
diff --git a/sonar-scanner-engine-shaded/pom.xml b/sonar-scanner-engine-shaded/pom.xml
deleted file mode 100644
index 2ccd95b2a02..00000000000
--- a/sonar-scanner-engine-shaded/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-scanner-engine-shaded</artifactId>
- <name>SonarQube :: Scanner Engine Shaded</name>
- <description>All Scanner Engine dependencies in a single jar</description>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-scanner-engine</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>empty-javadoc-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>javadoc</classifier>
- </configuration>
- </execution>
- <execution>
- <id>empty-sources-jar</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>sources</classifier>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sonar-scanner-engine/build.gradle b/sonar-scanner-engine/build.gradle
new file mode 100644
index 00000000000..e5ee1087be7
--- /dev/null
+++ b/sonar-scanner-engine/build.gradle
@@ -0,0 +1,63 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Scanner Engine"
+ }
+}
+
+// Excluding scanner files in order to benefit of incremental build support
+sourceSets.test.resources {
+ exclude '**/.sonar/**'
+}
+
+configurations {
+ testCompile.extendsFrom(compileOnly)
+}
+
+dependencies {
+ compile 'commons-codec:commons-codec'
+ compile 'commons-lang:commons-lang'
+ compile 'com.google.code.gson:gson'
+ compile 'com.google.guava:guava'
+ compile 'org.freemarker:freemarker'
+ compile 'org.slf4j:jul-to-slf4j'
+ compile 'org.slf4j:log4j-over-slf4j'
+ compile 'org.slf4j:slf4j-api'
+ compile 'org.sonarsource:sonar-persistit'
+ compile project(':sonar-core')
+ compile project(':sonar-scanner-protocol')
+ compile project(':sonar-ws')
+ compile project(':sonar-home')
+ compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'javax.servlet:javax.servlet-api'
+ testCompile 'junit:junit'
+ // Workaround to resolve dependencies of eclipse specific packaging: https://issues.gradle.org/browse/GRADLE-2076
+ testCompile module('org.eclipse.jetty:jetty-server') {
+ dependencies(
+ "org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016@jar",
+ "org.eclipse.jetty:jetty-continuation:8.1.2.v20120308",
+ "org.eclipse.jetty:jetty-http:8.1.2.v20120308"
+ )
+ }
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile 'net.javacrumbs.json-unit:json-unit-assertj:0.0.15'
+ testCompile project(':plugins:sonar-xoo-plugin')
+ testCompile project(':sonar-plugin-api').sourceSets.test.output
+}
+
+artifactoryPublish.skip = false
+
+// Used by core plugins
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-scanner-engine/pom.xml b/sonar-scanner-engine/pom.xml
deleted file mode 100644
index 622c760e457..00000000000
--- a/sonar-scanner-engine/pom.xml
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-scanner-engine</artifactId>
- <name>SonarQube :: Scanner Engine</name>
-
- <properties>
- <enableBenchmarkAssertions>false</enableBenchmarkAssertions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource</groupId>
- <artifactId>sonar-persistit</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-core</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-scanner-protocol</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-ws</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-home</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jul-to-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <!-- For HTML Report -->
- <dependency>
- <groupId>org.freemarker</groupId>
- <artifactId>freemarker</artifactId>
- </dependency>
-
- <!-- unit tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.tngtech.java</groupId>
- <artifactId>junit-dataprovider</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>net.javacrumbs.json-unit</groupId>
- <artifactId>json-unit-assertj</artifactId>
- <version>0.0.15</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-xoo-plugin</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>runBenchmarks</id>
- <activation>
- <property>
- <name>runBenchmarks</name>
- </property>
- </activation>
- <properties>
- <enableBenchmarkAssertions>true</enableBenchmarkAssertions>
- </properties>
- </profile>
- </profiles>
-</project>
diff --git a/sonar-scanner-protocol/build.gradle b/sonar-scanner-protocol/build.gradle
new file mode 100644
index 00000000000..b852cfa3e16
--- /dev/null
+++ b/sonar-scanner-protocol/build.gradle
@@ -0,0 +1,34 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Scanner :: Protocol"
+ property 'sonar.exclusions', 'src/main/java/org/sonar/scanner/protocol/viewer/**'
+ }
+}
+
+dependencies {
+ compile 'commons-io:commons-io'
+ compile 'com.google.code.gson:gson'
+ compile 'com.google.protobuf:protobuf-java'
+ compile 'net.jpountz.lz4:lz4'
+ compile project(':sonar-core')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'com.google.guava:guava'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile 'net.javacrumbs.json-unit:json-unit-assertj:0.0.15'
+}
+
+// Used by sonar-db-core to run DB Unit Tests
+artifactoryPublish.skip = false
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-scanner-protocol/pom.xml b/sonar-scanner-protocol/pom.xml
deleted file mode 100644
index 82d52b7179e..00000000000
--- a/sonar-scanner-protocol/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-scanner-protocol</artifactId>
- <name>SonarQube :: Scanner :: Protocol</name>
-
- <description>Classes used for communication between scanner and server</description>
-
- <properties>
- <!-- Viewer is for our internal use. This is not production code and mostly generated with Eclipse GUI builder -->
- <sonar.exclusions>target/generated-sources/**/*,src/main/java/org/sonar/scanner/protocol/viewer/**</sonar.exclusions>
- <sonar.test.exclusions>target/generated-test-sources/**/*</sonar.test.exclusions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>net.jpountz.lz4</groupId>
- <artifactId>lz4</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-core</artifactId>
- </dependency>
-
- <!-- unit tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>net.javacrumbs.json-unit</groupId>
- <artifactId>json-unit-assertj</artifactId>
- <version>0.0.15</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <finalName>scanner-report-viewer-${project.version}</finalName>
- <archive>
- <manifest>
- <mainClass>org.sonar.scanner.protocol.viewer.ScannerReportViewerApp</mainClass>
- </manifest>
- </archive>
- <descriptors>
- <descriptor>src/main/assembly/viewer.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sonar-testing-harness/build.gradle b/sonar-testing-harness/build.gradle
new file mode 100644
index 00000000000..3908c075238
--- /dev/null
+++ b/sonar-testing-harness/build.gradle
@@ -0,0 +1,29 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Testing Harness"
+ }
+}
+
+dependencies {
+ compile 'commons-io:commons-io'
+ compile 'com.googlecode.json-simple:json-simple'
+ compile 'com.google.code.gson:gson'
+ compile 'junit:junit'
+ compile 'org.hamcrest:hamcrest-core'
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+
+ testCompile 'org.assertj:assertj-core'
+}
+
+// Used by sonar-db-core to run DB Unit Tests
+artifactoryPublish.skip = false
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-testing-harness/pom.xml b/sonar-testing-harness/pom.xml
deleted file mode 100644
index 3b776e847eb..00000000000
--- a/sonar-testing-harness/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
- <artifactId>sonar-testing-harness</artifactId>
- <packaging>jar</packaging>
- <name>SonarQube :: Testing Harness</name>
-
- <dependencies>
- <dependency>
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java
index 00e6e6096a0..ec7aa2c2a81 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java
@@ -83,7 +83,7 @@ public class BundleSynchronizedMatcher extends BaseMatcher<String> {
@Override
public void describeTo(Description description) {
// report file
- File dumpFile = new File("target/l10n/" + bundleName + ".report.txt");
+ File dumpFile = new File("build/l10n/" + bundleName + ".report.txt");
// prepare message
StringBuilder details = prepareDetailsMessage(dumpFile);
diff --git a/sonar-ws-generator/build.gradle b/sonar-ws-generator/build.gradle
new file mode 100644
index 00000000000..01c9b640ea6
--- /dev/null
+++ b/sonar-ws-generator/build.gradle
@@ -0,0 +1,23 @@
+sonarqube {
+ skipProject = true
+}
+
+dependencies {
+ compile 'com.google.code.gson:gson:2.8.2'
+ compile 'com.google.guava:guava'
+ compile 'org.apache.velocity:velocity:1.7'
+ compile 'org.slf4j:log4j-over-slf4j'
+ compile 'org.sonarsource.orchestrator:sonar-orchestrator'
+ compile project(':sonar-ws')
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+}
+
+task fatJar(type: Jar) {
+ manifest {
+ attributes 'Main-Class': 'org.sonarqube.wsgenerator.Generator'
+ }
+ classifier = 'jar-with-dependencies'
+ from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
+ with jar
+}
diff --git a/sonar-ws-generator/pom.xml b/sonar-ws-generator/pom.xml
deleted file mode 100644
index 80a7bc25329..00000000000
--- a/sonar-ws-generator/pom.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-ws-generator</artifactId>
- <name>SonarQube :: Web Service :: Generator</name>
- <description>Generate source files of sonar-ws</description>
-
- <properties>
- <sonar.exclusions>src/**/*</sonar.exclusions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.7</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- <version>1.7.25</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.orchestrator</groupId>
- <artifactId>sonar-orchestrator</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-ws</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.8.2</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <id>run-ws-generator</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>assemble-all</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- <archive>
- <manifest>
- <mainClass>org.sonarqube.wsgenerator.Generator</mainClass>
- </manifest>
- </archive>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/sonar-ws-generator/run.sh b/sonar-ws-generator/run.sh
index f785bcb4032..ddc5a73bc82 100755
--- a/sonar-ws-generator/run.sh
+++ b/sonar-ws-generator/run.sh
@@ -3,7 +3,9 @@ set -euo pipefail
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
-cd $SCRIPTPATH
-mvn clean package -Prun-ws-generator
-java -jar target/sonar-ws-generator-*-SNAPSHOT-jar-with-dependencies.jar
-cp -R target/generated-sources/results/org/sonarqube/ws/client/* ../sonar-ws/src/main/java/org/sonarqube/ws/client
+pushd $SCRIPTPATH/..
+pwd
+./gradlew :sonar-ws-generator:build :sonar-ws-generator:fatJar
+popd
+java -jar build/libs/sonar-ws-generator-*-SNAPSHOT-jar-with-dependencies.jar
+cp -R build/generated-sources/results/org/sonarqube/ws/client/* ../sonar-ws/src/main/java/org/sonarqube/ws/client
diff --git a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java
index 29e210241fa..8c232851c21 100644
--- a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java
+++ b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java
@@ -20,6 +20,7 @@
package org.sonarqube.wsgenerator;
import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.http.HttpCall;
import com.sonar.orchestrator.http.HttpResponse;
import com.sonar.orchestrator.locator.FileLocation;
@@ -32,10 +33,10 @@ public class ApiDefinitionDownloader {
}
public static String downloadApiDefinition() {
- Orchestrator orchestrator = Orchestrator
- .builderEnv()
- .setZipFile(FileLocation.byWildcardMavenFilename(new File("../sonar-application/target"), "sonarqube-*.zip").getFile())
- .build();
+ OrchestratorBuilder builder = Orchestrator.builderEnv();
+ builder.setZipFile(FileLocation.byWildcardMavenFilename(new File("../sonar-application/build/distributions"), "sonar-application-*.zip").getFile())
+ .setOrchestratorProperty("orchestrator.workspaceDir", "build");
+ Orchestrator orchestrator = builder.build();
orchestrator.start();
try {
diff --git a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/Helper.java b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/Helper.java
index f76decd69a6..0d12506fd38 100644
--- a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/Helper.java
+++ b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/Helper.java
@@ -37,7 +37,7 @@ import static java.util.Arrays.asList;
public class Helper {
static final Set<String> PATH_EXCLUSIONS = new HashSet<>(asList("api/orchestrator"));
- private static final String OUTPUT_DIR = "target/generated-sources/results";
+ private static final String OUTPUT_DIR = "build/generated-sources/results";
private final Map<String, List<String[]>> responseTypes;
public Helper() {
diff --git a/sonar-ws/build.gradle b/sonar-ws/build.gradle
new file mode 100644
index 00000000000..5695a5a774d
--- /dev/null
+++ b/sonar-ws/build.gradle
@@ -0,0 +1,39 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Web Service"
+ property 'sonar.exclusions', 'src/main/java/org/sonarqube/ws/client/*/*.java'
+ }
+}
+
+configurations {
+ testCompile.extendsFrom(compileOnly)
+}
+
+dependencies {
+ compile 'commons-io:commons-io'
+ compile 'com.google.guava:guava'
+ compile 'com.google.protobuf:protobuf-java'
+ compile 'com.squareup.okhttp3:okhttp'
+
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+
+ testCompile 'commons-lang:commons-lang'
+ testCompile 'com.squareup.okhttp3:mockwebserver'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-testing-harness')
+}
+
+artifactoryPublish.skip = false
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
diff --git a/sonar-ws/pom.xml b/sonar-ws/pom.xml
deleted file mode 100644
index ba4a480ae05..00000000000
--- a/sonar-ws/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-ws</artifactId>
- <name>SonarQube :: Web Service</name>
- <description>Protocol Buffers specification of Web Services</description>
-
- <properties>
- <sonar.exclusions>target/generated-sources/**/*,src/main/java/org/sonarqube/ws/client/*/*.java</sonar.exclusions>
- <sonar.test.exclusions>target/generated-test-sources/**/*,src/test/java/org/sonarqube/ws/client/*/*.java</sonar.test.exclusions>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>okhttp</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
-
- <!-- Tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sonar-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>mockwebserver</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/stop.sh b/stop.sh
index 056b97401ad..e06029e1baf 100755
--- a/stop.sh
+++ b/stop.sh
@@ -8,7 +8,7 @@ else
OS='linux-x86-64'
fi
-SONAR_SH=sonar-application/target/sonarqube-*/bin/$OS/sonar.sh
+SONAR_SH=sonar-application/build/distributions/sonarqube-*/bin/$OS/sonar.sh
if [ -f $SONAR_SH ]; then
sh $SONAR_SH stop
fi
diff --git a/tests/build.gradle b/tests/build.gradle
new file mode 100644
index 00000000000..3f4d6d8c61e
--- /dev/null
+++ b/tests/build.gradle
@@ -0,0 +1,149 @@
+ext {
+ jettyVersion = '9.3.11.v20160721'
+ bytemanVersion = '3.0.10'
+}
+
+configurations {
+ sqZip
+ includeInTestResources
+}
+
+def pluginsForITs = [
+ ':plugins:sonar-xoo-plugin',
+ ':tests:plugins:access-secured-props-plugin',
+ ':tests:plugins:base-auth-plugin',
+ ':tests:plugins:batch-plugin',
+ ':tests:plugins:extension-lifecycle-plugin',
+ ':tests:plugins:fake-billing-plugin',
+ ':tests:plugins:fake-governance-plugin',
+ ':tests:plugins:foo-plugin-v1',
+ ':tests:plugins:foo-plugin-v2',
+ ':tests:plugins:global-property-change-plugin',
+ ':tests:plugins:issue-filter-plugin',
+ ':tests:plugins:l10n-fr-pack',
+ ':tests:plugins:license-plugin',
+ ':tests:plugins:oauth2-auth-plugin',
+ ':tests:plugins:project-builder-plugin',
+ ':tests:plugins:property-relocation-plugin',
+ ':tests:plugins:property-sets-plugin',
+ ':tests:plugins:security-plugin',
+ ':tests:plugins:server-plugin',
+ ':tests:plugins:settings-encryption-plugin',
+ ':tests:plugins:settings-plugin',
+ ':tests:plugins:sonar-fake-plugin',
+ ':tests:plugins:sonar-subcategories-plugin',
+ ':tests:plugins:ui-extensions-plugin',
+ ':tests:plugins:posttask-plugin',
+ ':tests:plugins:wait-at-platform-level4-plugin',
+ ':tests:plugins:ws-plugin',
+ ':tests:plugins:backdating-plugin-v1',
+ ':tests:plugins:backdating-plugin-v2',
+ ':tests:plugins:backdating-customplugin'
+]
+
+dependencies {
+ testCompile 'org.sonarsource.orchestrator:sonar-orchestrator'
+ testCompile project(':server:sonar-qa-util')
+ testCompile project(':sonar-ws')
+ // required version 23.0 for selenide
+ testCompile 'com.google.guava:guava:23.0'
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.assertj:assertj-guava'
+ testCompile 'com.googlecode.json-simple:json-simple'
+ testCompile 'org.skyscreamer:jsonassert:1.2.0'
+ testCompile 'com.squareup.okhttp3:mockwebserver'
+ testCompile 'org.subethamail:subethasmtp'
+ testCompile "org.eclipse.jetty:jetty-server:${jettyVersion}"
+ testCompile "org.eclipse.jetty:jetty-servlet:${jettyVersion}"
+ testCompile "org.eclipse.jetty:jetty-proxy:${jettyVersion}"
+ testCompile "org.jboss.byteman:byteman-submit:${bytemanVersion}"
+ testCompile 'com.microsoft.sqlserver:mssql-jdbc'
+ testCompile 'mysql:mysql-connector-java'
+ testCompile 'org.postgresql:postgresql'
+ testCompile 'com.oracle.jdbc:ojdbc8'
+
+ includeInTestResources "org.jboss.byteman:byteman:${bytemanVersion}"
+}
+
+sonarqube {
+ skipProject = true
+}
+
+//UT are excluding in order for ITs to only run when needed
+test{
+ exclude '*'
+}
+
+task integrationTest(type: Test) {
+ description = 'Runs integration tests'
+
+ for (plugin in pluginsForITs) {
+ dependsOn project(plugin).assemble
+ }
+
+ jacoco.enabled = false
+
+ systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
+ systemProperty 'orchestrator.artifactory.apiKey', System.getProperty('orchestrator.artifactory.apiKey')
+ systemProperty 'orchestrator.artifactory.repositories', System.getProperty('orchestrator.artifactory.repositories')
+ if (project.hasProperty('cix')) {
+ systemProperty 'sonar.runtimeVersion', version
+ }
+
+ def category = System.getProperty('category')
+ filter {
+ switch (category) {
+ case 'Lite':
+ includeTestsMatching 'org.sonarqube.tests.lite.*Suite'
+ break
+ case 'Category1':
+ includeTestsMatching 'org.sonarqube.tests.Category1Suite'
+ includeTestsMatching 'org.sonarqube.tests.authorization.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.measure.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.qualityGate.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.source.*Suite'
+ break
+ case 'Category2':
+ includeTestsMatching 'org.sonarqube.tests.issue.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.test.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.qualityModel.*Suite'
+ break
+ case 'Category3':
+ includeTestsMatching 'org.sonarqube.tests.Category3Suite'
+ includeTestsMatching 'org.sonarqube.tests.component.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.project.*Suite'
+ break
+ case 'Category4':
+ includeTestsMatching 'org.sonarqube.tests.Category4Suite'
+ includeTestsMatching 'org.sonarqube.tests.duplication.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.user.*Suite'
+ includeTestsMatching 'org.sonarqube.tests.webhook.*Suite'
+ break
+ case 'Category5':
+ includeTestsMatching 'org.sonarqube.tests.Category5Suite'
+ break
+ case 'Category6':
+ includeTestsMatching 'org.sonarqube.tests.Category6Suite'
+ includeTestsMatching 'org.sonarqube.tests.organization.*Suite'
+ break
+ case 'Plugins':
+ includeTestsMatching 'org.sonarqube.tests.plugins.PluginsSuite'
+ break
+ case 'Upgrade':
+ includeTestsMatching 'org.sonarqube.tests.upgrade.UpgradeSuite'
+ break
+ case 'ServerPerformance':
+ includeTestsMatching 'org.sonarqube.tests.performance.server.ServerPerformanceSuite'
+ break
+ }
+ }
+}
+
+processTestResources() {
+ into('/') {
+ from configurations.includeInTestResources
+ // TODO cache not invalidated when pattern changes?
+ rename '(.*)-' + bytemanVersion + '.jar', '$1.jar'
+ }
+}
diff --git a/tests/plugins/access-secured-props-plugin/build.gradle b/tests/plugins/access-secured-props-plugin/build.gradle
new file mode 100644
index 00000000000..b41c78ff478
--- /dev/null
+++ b/tests/plugins/access-secured-props-plugin/build.gradle
@@ -0,0 +1,19 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'AccessSecuredPropsPlugin',
+ 'Plugin-Version': '1.0.2.42',
+ 'Plugin-Display-Version': '1.0.2 (build 42)',
+ 'Plugin-Class': 'AccessSecuredPropsPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Access Secured PropertiesFoo',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/access-secured-props-plugin/pom.xml b/tests/plugins/access-secured-props-plugin/pom.xml
deleted file mode 100644
index 55fe1f96b98..00000000000
--- a/tests/plugins/access-secured-props-plugin/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>access-secured-props-plugin</artifactId>
- <packaging>sonar-plugin</packaging>
- <name>Plugins :: Access Secured Properties</name>
- <version>1.0.2.42</version>
- <description>Access .secured properties</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.18.0.372</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>AccessSecuredPropsPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/backdating-customplugin/build.gradle b/tests/plugins/backdating-customplugin/build.gradle
new file mode 100644
index 00000000000..1e047a85029
--- /dev/null
+++ b/tests/plugins/backdating-customplugin/build.gradle
@@ -0,0 +1,31 @@
+sonarqube {
+ skipProject = true
+}
+
+dependencies {
+ compile 'com.google.guava:guava'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compileOnly project(':tests:plugins:backdating-plugin-v1')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'custombackdating',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'org.sonar.backdating.custom.BackdatingPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Custom',
+ 'Plugin-License': 'GNU LGPL 3',
+ 'Plugin-Base': 'backdating'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/backdating-customplugin/pom.xml b/tests/plugins/backdating-customplugin/pom.xml
deleted file mode 100644
index 2072ab6b84b..00000000000
--- a/tests/plugins/backdating-customplugin/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
- <artifactId>backdating-customplugin</artifactId>
- <name>SonarQube :: Plugins :: Backdating (custom)</name>
- <packaging>sonar-plugin</packaging>
- <description>Sample of custom rule plugin to test issue backdating</description>
-
- <properties>
- <sonar.skip>true</sonar.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>backdating-plugin-v1</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <configuration>
- <pluginKey>custombackdating</pluginKey>
- <pluginName>Custom</pluginName>
- <basePlugin>backdating</basePlugin>
- <pluginClass>org.sonar.backdating.custom.BackdatingPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/backdating-plugin-v1/build.gradle b/tests/plugins/backdating-plugin-v1/build.gradle
new file mode 100644
index 00000000000..8ef8bb8177d
--- /dev/null
+++ b/tests/plugins/backdating-plugin-v1/build.gradle
@@ -0,0 +1,29 @@
+sonarqube {
+ skipProject = true
+}
+
+dependencies {
+ compile 'com.google.guava:guava'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'backdating',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'org.sonar.plugins.backdating.BackdatingPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Foo',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/backdating-plugin-v1/pom.xml b/tests/plugins/backdating-plugin-v1/pom.xml
deleted file mode 100644
index f1f567bc73f..00000000000
--- a/tests/plugins/backdating-plugin-v1/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
- <artifactId>backdating-plugin-v1</artifactId>
- <name>SonarQube :: Plugins :: Backdating (V1)</name>
- <packaging>sonar-plugin</packaging>
- <description>Sample of plugin to test issue backdating</description>
-
- <properties>
- <sonar.skip>true</sonar.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <configuration>
- <pluginKey>backdating</pluginKey>
- <pluginName>Foo</pluginName>
- <pluginClass>org.sonar.plugins.backdating.BackdatingPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/backdating-plugin-v2/build.gradle b/tests/plugins/backdating-plugin-v2/build.gradle
new file mode 100644
index 00000000000..202d2bbeebc
--- /dev/null
+++ b/tests/plugins/backdating-plugin-v2/build.gradle
@@ -0,0 +1,29 @@
+sonarqube {
+ skipProject = true
+}
+
+dependencies {
+ compile 'com.google.guava:guava'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compileOnly 'com.google.code.findbugs:jsr305'
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'backdating',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'org.sonar.plugins.backdating.BackdatingPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Foo',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/backdating-plugin-v2/pom.xml b/tests/plugins/backdating-plugin-v2/pom.xml
deleted file mode 100644
index fefc6bba2fd..00000000000
--- a/tests/plugins/backdating-plugin-v2/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
- <artifactId>backdating-plugin-v2</artifactId>
- <name>SonarQube :: Plugins :: Backdating (V2)</name>
- <packaging>sonar-plugin</packaging>
- <description>Sample of plugin to test issue backdating</description>
-
- <properties>
- <sonar.skip>true</sonar.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <configuration>
- <pluginKey>backdating</pluginKey>
- <pluginName>Foo</pluginName>
- <pluginClass>org.sonar.plugins.backdating.BackdatingPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/base-auth-plugin/build.gradle b/tests/plugins/base-auth-plugin/build.gradle
new file mode 100644
index 00000000000..ee1c6490082
--- /dev/null
+++ b/tests/plugins/base-auth-plugin/build.gradle
@@ -0,0 +1,25 @@
+dependencies {
+ compile('com.google.guava:guava:17.0') {
+ exclude group: 'com.google.code.findbugs', module: 'jsr305'
+ }
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compileOnly 'javax.servlet:javax.servlet-api:3.0.1'
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'baseauthplugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'FakeBaseAuthPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Fake Base Authentication Plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/base-auth-plugin/pom.xml b/tests/plugins/base-auth-plugin/pom.xml
deleted file mode 100644
index 7b2555b98f8..00000000000
--- a/tests/plugins/base-auth-plugin/pom.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>base-auth-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>Plugins :: Fake Base Authentication Plugin</name>
- <description>Test for base authentication plugin (like openid)</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>17.0</version>
- <exclusions>
- <exclusion>
- <!-- should be declared with scope provided -->
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <configuration>
- <pluginClass>FakeBaseAuthPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/batch-plugin/build.gradle b/tests/plugins/batch-plugin/build.gradle
new file mode 100644
index 00000000000..e21395aa1be
--- /dev/null
+++ b/tests/plugins/batch-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'batch-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'com.sonarsource.BatchPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'SonarQube Integration Tests :: Plugins :: Batch',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/batch-plugin/pom.xml b/tests/plugins/batch-plugin/pom.xml
deleted file mode 100644
index 4bd7041393a..00000000000
--- a/tests/plugins/batch-plugin/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>batch-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>SonarQube Integration Tests :: Plugins :: Batch</name>
- <description>Main plugin for batch tests</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>com.sonarsource.BatchPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/extension-lifecycle-plugin/build.gradle b/tests/plugins/extension-lifecycle-plugin/build.gradle
new file mode 100644
index 00000000000..92d5faefce3
--- /dev/null
+++ b/tests/plugins/extension-lifecycle-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'extension-lifecycle-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'ExtensionLifecyclePlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Extension Lifecycle',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/extension-lifecycle-plugin/pom.xml b/tests/plugins/extension-lifecycle-plugin/pom.xml
deleted file mode 100644
index 73e6a088a4e..00000000000
--- a/tests/plugins/extension-lifecycle-plugin/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
- <artifactId>extension-lifecycle-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Extension Lifecycle</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>ExtensionLifecyclePlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/fake-billing-plugin/build.gradle b/tests/plugins/fake-billing-plugin/build.gradle
new file mode 100644
index 00000000000..fe1303c5633
--- /dev/null
+++ b/tests/plugins/fake-billing-plugin/build.gradle
@@ -0,0 +1,19 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compileOnly project(':server:sonar-server')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'billing',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'FakeBillingPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Fake Billing Plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/fake-billing-plugin/pom.xml b/tests/plugins/fake-billing-plugin/pom.xml
deleted file mode 100644
index a5430e50a1a..00000000000
--- a/tests/plugins/fake-billing-plugin/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>fake-billing-plugin</artifactId>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Fake Billing Plugin</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-server</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>FakeBillingPlugin</pluginClass>
- <pluginKey>billing</pluginKey>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/fake-governance-plugin/build.gradle b/tests/plugins/fake-governance-plugin/build.gradle
new file mode 100644
index 00000000000..225751ba344
--- /dev/null
+++ b/tests/plugins/fake-governance-plugin/build.gradle
@@ -0,0 +1,19 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compileOnly project(':server:sonar-server')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'governance',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'FakeGovernancePlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Fake Governance Plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/fake-governance-plugin/pom.xml b/tests/plugins/fake-governance-plugin/pom.xml
deleted file mode 100644
index 1442c73d770..00000000000
--- a/tests/plugins/fake-governance-plugin/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>fake-governance-plugin</artifactId>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Fake Governance Plugin</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-server</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>FakeGovernancePlugin</pluginClass>
- <pluginKey>governance</pluginKey>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/foo-plugin-v1/build.gradle b/tests/plugins/foo-plugin-v1/build.gradle
new file mode 100644
index 00000000000..c768ae45a98
--- /dev/null
+++ b/tests/plugins/foo-plugin-v1/build.gradle
@@ -0,0 +1,29 @@
+sonarqube {
+ skipProject = true
+}
+
+dependencies {
+ compile 'com.google.guava:guava'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'foo',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'org.sonar.foo.FooPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Foo',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/foo-plugin-v1/pom.xml b/tests/plugins/foo-plugin-v1/pom.xml
deleted file mode 100644
index ce6bec89282..00000000000
--- a/tests/plugins/foo-plugin-v1/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
- <artifactId>foo-plugin-v1</artifactId>
- <name>SonarQube :: Plugins :: Foo (V1)</name>
- <packaging>sonar-plugin</packaging>
- <description>Sample of plugin to document and test available APIs</description>
-
- <properties>
- <sonar.skip>true</sonar.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <configuration>
- <pluginKey>foo</pluginKey>
- <pluginName>Foo</pluginName>
- <pluginClass>org.sonar.foo.FooPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/foo-plugin-v2/build.gradle b/tests/plugins/foo-plugin-v2/build.gradle
new file mode 100644
index 00000000000..c768ae45a98
--- /dev/null
+++ b/tests/plugins/foo-plugin-v2/build.gradle
@@ -0,0 +1,29 @@
+sonarqube {
+ skipProject = true
+}
+
+dependencies {
+ compile 'com.google.guava:guava'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'foo',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'org.sonar.foo.FooPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Foo',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/foo-plugin-v2/pom.xml b/tests/plugins/foo-plugin-v2/pom.xml
deleted file mode 100644
index 1bd47c6e5c7..00000000000
--- a/tests/plugins/foo-plugin-v2/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
- <artifactId>foo-plugin-v2</artifactId>
- <name>SonarQube :: Plugins :: Foo (V2)</name>
- <packaging>sonar-plugin</packaging>
- <description>Sample of plugin to document and test available APIs</description>
-
- <properties>
- <sonar.skip>true</sonar.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- unit testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <configuration>
- <pluginKey>foo</pluginKey>
- <pluginName>Foo</pluginName>
- <pluginClass>org.sonar.foo.FooPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/global-property-change-plugin/build.gradle b/tests/plugins/global-property-change-plugin/build.gradle
new file mode 100644
index 00000000000..6832540b178
--- /dev/null
+++ b/tests/plugins/global-property-change-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'global-property-change-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'GlobalPropertyChangePlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Plugins :: Global Property Change',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/global-property-change-plugin/pom.xml b/tests/plugins/global-property-change-plugin/pom.xml
deleted file mode 100644
index c906feaf2af..00000000000
--- a/tests/plugins/global-property-change-plugin/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>global-property-change-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Global Property Change</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>GlobalPropertyChangePlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/issue-filter-plugin/build.gradle b/tests/plugins/issue-filter-plugin/build.gradle
new file mode 100644
index 00000000000..63fe9a1d629
--- /dev/null
+++ b/tests/plugins/issue-filter-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'issue-filter-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'IssueFilterPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'IT :: Issue Filter',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/issue-filter-plugin/pom.xml b/tests/plugins/issue-filter-plugin/pom.xml
deleted file mode 100644
index 6027229a423..00000000000
--- a/tests/plugins/issue-filter-plugin/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>issue-filter-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>IT :: Issue Filter</name>
- <description>IT :: Issue Filter</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>IssueFilterPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/l10n-fr-pack/build.gradle b/tests/plugins/l10n-fr-pack/build.gradle
new file mode 100644
index 00000000000..0e528ef2cf1
--- /dev/null
+++ b/tests/plugins/l10n-fr-pack/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'l10n-fr-pack',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'SimpleFrenchPackPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'l10n-fr-pack',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/l10n-fr-pack/pom.xml b/tests/plugins/l10n-fr-pack/pom.xml
deleted file mode 100644
index 59f84aaedbe..00000000000
--- a/tests/plugins/l10n-fr-pack/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>l10n-fr-pack</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>IT :: Simple French Language Pack</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <basePlugin>l10nen</basePlugin>
- <pluginClass>SimpleFrenchPackPlugin</pluginClass>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>native2ascii-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
- <executions>
- <execution>
- <goals>
- <goal>native2ascii</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/license-plugin/build.gradle b/tests/plugins/license-plugin/build.gradle
new file mode 100644
index 00000000000..8ec6c368508
--- /dev/null
+++ b/tests/plugins/license-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'license-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'LicensePlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'license-plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/license-plugin/pom.xml b/tests/plugins/license-plugin/pom.xml
deleted file mode 100644
index a3754d95edc..00000000000
--- a/tests/plugins/license-plugin/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>license-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: License</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>LicensePlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/oauth2-auth-plugin/build.gradle b/tests/plugins/oauth2-auth-plugin/build.gradle
new file mode 100644
index 00000000000..f0d08a98294
--- /dev/null
+++ b/tests/plugins/oauth2-auth-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'oauth2-auth-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'FakeOAuth2AuthPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Fake OAuth2 Authentication Plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/oauth2-auth-plugin/pom.xml b/tests/plugins/oauth2-auth-plugin/pom.xml
deleted file mode 100644
index 700b6354589..00000000000
--- a/tests/plugins/oauth2-auth-plugin/pom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>oauth2-auth-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>Plugins :: Fake OAuth2 Authentication Plugin</name>
- <description>Test for OAuth2 authentication plugin (like openid)</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <configuration>
- <pluginClass>FakeOAuth2AuthPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/pom.xml b/tests/plugins/pom.xml
deleted file mode 100644
index fb1746c1363..00000000000
--- a/tests/plugins/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <name>SonarQube Integration Tests :: Plugins</name>
- <description>The fake plugins used by integration tests</description>
- <packaging>pom</packaging>
-
- <properties>
- <skipSanityChecks>true</skipSanityChecks>
- <enforcer.skip>true</enforcer.skip>
- <maven.deploy.skip>true</maven.deploy.skip>
- <source.skip>true</source.skip>
- <apiVersion>${project.parent.version}</apiVersion>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <modules>
- <module>access-secured-props-plugin</module>
- <module>base-auth-plugin</module>
- <module>batch-plugin</module>
- <module>extension-lifecycle-plugin</module>
- <module>fake-billing-plugin</module>
- <module>fake-governance-plugin</module>
- <module>foo-plugin-v1</module>
- <module>foo-plugin-v2</module>
- <module>global-property-change-plugin</module>
- <module>issue-filter-plugin</module>
- <module>l10n-fr-pack</module>
- <module>license-plugin</module>
- <module>oauth2-auth-plugin</module>
- <module>project-builder-plugin</module>
- <module>property-relocation-plugin</module>
- <module>property-sets-plugin</module>
- <module>security-plugin</module>
- <module>server-plugin</module>
- <module>settings-encryption-plugin</module>
- <module>settings-plugin</module>
- <module>sonar-fake-plugin</module>
- <module>sonar-subcategories-plugin</module>
- <module>ui-extensions-plugin</module>
- <module>posttask-plugin</module>
- <module>wait-at-platform-level4-plugin</module>
- <module>ws-plugin</module>
- <module>backdating-plugin-v1</module>
- <module>backdating-plugin-v2</module>
- <module>backdating-customplugin</module>
- </modules>
-</project>
diff --git a/tests/plugins/posttask-plugin/build.gradle b/tests/plugins/posttask-plugin/build.gradle
new file mode 100644
index 00000000000..da9560a10dd
--- /dev/null
+++ b/tests/plugins/posttask-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'posttask-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'PostTaskPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'SonarQube Integration Tests :: Plugins :: PostTask',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/posttask-plugin/pom.xml b/tests/plugins/posttask-plugin/pom.xml
deleted file mode 100644
index 6b1dbe398d4..00000000000
--- a/tests/plugins/posttask-plugin/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>posttask-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>SonarQube Integration Tests :: Plugins :: PostTask</name>
- <description>Plugin testing the Compute Engine Post Task API</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>PostTaskPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/project-builder-plugin/build.gradle b/tests/plugins/project-builder-plugin/build.gradle
new file mode 100644
index 00000000000..ca035179e9a
--- /dev/null
+++ b/tests/plugins/project-builder-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'project-builder-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'ProjectBuilderPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Project Builder',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/project-builder-plugin/pom.xml b/tests/plugins/project-builder-plugin/pom.xml
deleted file mode 100644
index 98ed082222d..00000000000
--- a/tests/plugins/project-builder-plugin/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
- <artifactId>project-builder-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Project Builder</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency> </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>ProjectBuilderPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/property-relocation-plugin/build.gradle b/tests/plugins/property-relocation-plugin/build.gradle
new file mode 100644
index 00000000000..14ed5d44966
--- /dev/null
+++ b/tests/plugins/property-relocation-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'property-relocation-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'PropertyRelocationPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'property-relocation-plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/property-relocation-plugin/pom.xml b/tests/plugins/property-relocation-plugin/pom.xml
deleted file mode 100644
index a5915c85909..00000000000
--- a/tests/plugins/property-relocation-plugin/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>property-relocation-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Property Relocation</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>PropertyRelocationPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/property-sets-plugin/build.gradle b/tests/plugins/property-sets-plugin/build.gradle
new file mode 100644
index 00000000000..6ce9d77d5ee
--- /dev/null
+++ b/tests/plugins/property-sets-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'property-sets-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'PropertySetsPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'property-sets-plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/property-sets-plugin/pom.xml b/tests/plugins/property-sets-plugin/pom.xml
deleted file mode 100644
index c8081a72fa1..00000000000
--- a/tests/plugins/property-sets-plugin/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>property-sets-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Property Sets</description>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>PropertySetsPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/security-plugin/build.gradle b/tests/plugins/security-plugin/build.gradle
new file mode 100644
index 00000000000..cfd4d2bbe0f
--- /dev/null
+++ b/tests/plugins/security-plugin/build.gradle
@@ -0,0 +1,29 @@
+configurations {
+ testCompile.extendsFrom(compileOnly)
+}
+
+dependencies {
+ compile 'commons-lang:commons-lang'
+ compile 'com.google.guava:guava'
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+ testCompile 'junit:junit'
+ testCompile 'org.assertj:assertj-core'
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'security-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'SecurityPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'security-plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/security-plugin/pom.xml b/tests/plugins/security-plugin/pom.xml
deleted file mode 100644
index 5664abd0c66..00000000000
--- a/tests/plugins/security-plugin/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>security-plugin</artifactId>
- <packaging>sonar-plugin</packaging>
- <version>1.0-SNAPSHOT</version>
- <description>Plugins :: Security</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <version>2.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-guava</artifactId>
- <version>1.3.1</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>SecurityPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/tests/plugins/server-plugin/build.gradle b/tests/plugins/server-plugin/build.gradle
new file mode 100644
index 00000000000..685e50ec050
--- /dev/null
+++ b/tests/plugins/server-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'server-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'ServerPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'SonarQube Integration Tests :: Plugins :: Server',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/server-plugin/pom.xml b/tests/plugins/server-plugin/pom.xml
deleted file mode 100644
index ea012d4ab81..00000000000
--- a/tests/plugins/server-plugin/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>server-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>SonarQube Integration Tests :: Plugins :: Server</name>
- <description>Main plugin for Server tests</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>ServerPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/settings-encryption-plugin/build.gradle b/tests/plugins/settings-encryption-plugin/build.gradle
new file mode 100644
index 00000000000..c7fb784e794
--- /dev/null
+++ b/tests/plugins/settings-encryption-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'settings-encryption-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'SettingsEncryptionPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'settings-encryption-plugin',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/settings-encryption-plugin/pom.xml b/tests/plugins/settings-encryption-plugin/pom.xml
deleted file mode 100644
index c3395957065..00000000000
--- a/tests/plugins/settings-encryption-plugin/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
- <artifactId>settings-encryption-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Settings Encryption</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>SettingsEncryptionPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/settings-plugin/build.gradle b/tests/plugins/settings-plugin/build.gradle
new file mode 100644
index 00000000000..44489319a50
--- /dev/null
+++ b/tests/plugins/settings-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'settings-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'SettingsPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Settings',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/settings-plugin/pom.xml b/tests/plugins/settings-plugin/pom.xml
deleted file mode 100644
index db0bb95516a..00000000000
--- a/tests/plugins/settings-plugin/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>settings-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <description>Plugins :: Settings</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>SettingsPlugin</pluginClass>
- <pluginName>Settings</pluginName>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/sonar-fake-plugin/build.gradle b/tests/plugins/sonar-fake-plugin/build.gradle
new file mode 100644
index 00000000000..0696ae95234
--- /dev/null
+++ b/tests/plugins/sonar-fake-plugin/build.gradle
@@ -0,0 +1,19 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'fake',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'FakePlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Fake',
+ 'Plugin-License': 'GNU LGPL 3',
+ 'Plugin-Organization': 'SonarSource'
+ )
+ }
+}
diff --git a/tests/plugins/sonar-fake-plugin/pom.xml b/tests/plugins/sonar-fake-plugin/pom.xml
deleted file mode 100644
index d0945e97d09..00000000000
--- a/tests/plugins/sonar-fake-plugin/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-fake-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>Plugins :: Fake</name>
- <description>SonarQube Integration Tests :: Fake Plugin</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <configuration>
- <pluginClass>FakePlugin</pluginClass>
- <pluginKey>fake</pluginKey>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/sonar-subcategories-plugin/build.gradle b/tests/plugins/sonar-subcategories-plugin/build.gradle
new file mode 100644
index 00000000000..53ad942de98
--- /dev/null
+++ b/tests/plugins/sonar-subcategories-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'sonar-subcategories-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'SubCategoriesPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: SubCategories',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/sonar-subcategories-plugin/pom.xml b/tests/plugins/sonar-subcategories-plugin/pom.xml
deleted file mode 100644
index 85ea4f9714c..00000000000
--- a/tests/plugins/sonar-subcategories-plugin/pom.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>sonar-subcategories-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
-
- <name>Plugins :: SubCategories</name>
- <description>Plugins :: SubCategories</description>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>SubCategoriesPlugin</pluginClass>
- </configuration>
- </plugin>
-
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>native2ascii-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
- <executions>
- <execution>
- <goals>
- <goal>native2ascii</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/ui-extensions-plugin/build.gradle b/tests/plugins/ui-extensions-plugin/build.gradle
new file mode 100644
index 00000000000..5f85c3dd294
--- /dev/null
+++ b/tests/plugins/ui-extensions-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'ui-extensions-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'UiExtensionsPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'SonarQube Integration Tests :: Plugins :: UI extensions',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/ui-extensions-plugin/pom.xml b/tests/plugins/ui-extensions-plugin/pom.xml
deleted file mode 100644
index 1bbd2a52ccf..00000000000
--- a/tests/plugins/ui-extensions-plugin/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>ui-extensions-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>SonarQube Integration Tests :: Plugins :: UI extensions</name>
- <description>Main plugin for UT extensions tests</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>UiExtensionsPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/wait-at-platform-level4-plugin/build.gradle b/tests/plugins/wait-at-platform-level4-plugin/build.gradle
new file mode 100644
index 00000000000..626dad0d2a2
--- /dev/null
+++ b/tests/plugins/wait-at-platform-level4-plugin/build.gradle
@@ -0,0 +1,18 @@
+dependencies {
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'wait-at-platform-level4-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'WaitAtPlaformLevel4Plugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'Plugins :: Wait at platform level4 initialization phase',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+}
diff --git a/tests/plugins/wait-at-platform-level4-plugin/pom.xml b/tests/plugins/wait-at-platform-level4-plugin/pom.xml
deleted file mode 100644
index dc68f3f652d..00000000000
--- a/tests/plugins/wait-at-platform-level4-plugin/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>wait-at-platform-level4-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>Plugins :: Wait at platform level4 initialization phase</name>
- <description>Test for failing Elasticsearch on platform4</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>17.0</version>
- <exclusions>
- <exclusion>
- <!-- should be declared with scope provided -->
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <version>1.15</version>
- <configuration>
- <pluginClass>WaitAtPlaformLevel4Plugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/plugins/ws-plugin/build.gradle b/tests/plugins/ws-plugin/build.gradle
new file mode 100644
index 00000000000..879e3df31f0
--- /dev/null
+++ b/tests/plugins/ws-plugin/build.gradle
@@ -0,0 +1,22 @@
+dependencies {
+ compile project(':sonar-ws')
+ compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
+}
+
+jar {
+ manifest {
+ attributes(
+ 'Plugin-Key': 'ws-plugin',
+ 'Plugin-Version': version,
+ 'Plugin-Class': 'WsPlugin',
+ 'Plugin-ChildFirstClassLoader': 'false',
+ 'Sonar-Version': '7.1-SNAPSHOT',
+ 'SonarLint-Supported': 'false',
+ 'Plugin-Name': 'SonarQube Integration Tests :: Plugins :: Ws',
+ 'Plugin-License': 'GNU LGPL 3'
+ )
+ }
+ into('META-INF/lib') {
+ from configurations.compile
+ }
+}
diff --git a/tests/plugins/ws-plugin/pom.xml b/tests/plugins/ws-plugin/pom.xml
deleted file mode 100644
index c0c0d8e6dca..00000000000
--- a/tests/plugins/ws-plugin/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>plugins</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>ws-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>sonar-plugin</packaging>
- <name>SonarQube Integration Tests :: Plugins :: Ws</name>
- <description>Plugin for WS tests</description>
-
- <dependencies>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-plugin-api</artifactId>
- <version>${apiVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-ws</artifactId>
- <version>${apiVersion}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
- <artifactId>sonar-packaging-maven-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <pluginClass>WsPlugin</pluginClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/tests/pom.xml b/tests/pom.xml
deleted file mode 100644
index 09a4a0aa7a4..00000000000
--- a/tests/pom.xml
+++ /dev/null
@@ -1,282 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonarqube</artifactId>
- <version>7.1-SNAPSHOT</version>
- </parent>
-
- <groupId>org.sonarsource.sonarqube.tests</groupId>
- <artifactId>tests</artifactId>
- <name>SonarQube Integration Tests</name>
- <description>Integration, performance, upgrade tests</description>
-
- <properties>
- <maven.deploy.skip>true</maven.deploy.skip>
- <source.skip>true</source.skip>
- <enforcer.skip>true</enforcer.skip>
- <skipSanityChecks>true</skipSanityChecks>
- <sqZipDir>../sonar-application/target</sqZipDir>
- <category>*</category>
- <skipIts>false</skipIts>
- <jetty.version>9.3.11.v20160721</jetty.version>
- <byteman.version>3.0.10</byteman.version>
- </properties>
-
- <dependencies>
- <!-- This is just to force Maven to download it in local repository -->
- <dependency>
- <groupId>com.sonarsource.license</groupId>
- <artifactId>sonar-dev-license-plugin</artifactId>
- <!-- Should be the same version than in Orchestrator builder in your test suite -->
- <version>3.2.0.1163</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <!-- required for selenide -->
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>23.0</version>
- <scope>test</scope>
- </dependency>
- <!-- must be declared first -->
- <dependency>
- <groupId>org.sonarsource.orchestrator</groupId>
- <artifactId>sonar-orchestrator</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <!-- required for overriding ws-client 4.5 to have complete error stacktraces
- in Issue tests -->
- <groupId>org.codehaus.sonar</groupId>
- <artifactId>sonar-ws-client</artifactId>
- <version>5.0</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-application</artifactId>
- <version>${project.version}</version>
- <type>zip</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-qa-util</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-process</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-ws</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-guava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- </dependency>
- <dependency>
- <groupId>org.skyscreamer</groupId>
- <artifactId>jsonassert</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.okhttp3</groupId>
- <artifactId>mockwebserver</artifactId>
- </dependency>
- <dependency>
- <groupId>org.subethamail</groupId>
- <artifactId>subethasmtp</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-proxy</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.sonarsource.scanner.cli</groupId>
- <artifactId>sonar-scanner-cli</artifactId>
- <version>2.7</version>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.byteman</groupId>
- <artifactId>byteman-submit</artifactId>
- <version>${byteman.version}</version>
- </dependency>
-
- <!-- JDBC drivers -->
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- </dependency>
- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>mssql-jdbc</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Dsonar.runtimeVersion=${project.version}
- -Dmaven.localRepository=${settings.localRepository}
- </argLine>
- <skipTests>${skipIts}</skipTests>
- <includes>
- <include>%regex[.*/(${category})/.*Suite.class]</include>
-
- <!-- deprecated categories -->
- <include>%regex[.*/(${category})Suite.class]</include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-byteman-for-resilience-tests</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.byteman</groupId>
- <artifactId>byteman</artifactId>
- <version>${byteman.version}</version>
- <overWrite>false</overWrite>
- <destFileName>byteman.jar</destFileName>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.basedir}/target</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>false</overWriteSnapshots>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <!-- TODO rename to oracle -->
- <id>with-db-drivers</id>
- <activation>
- <property>
- <name>with-db-drivers</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.oracle.jdbc</groupId>
- <artifactId>ojdbc8</artifactId>
- </dependency>
- </dependencies>
- </profile>
-
- <profile>
- <id>qa</id>
- <activation>
- <property>
- <name>env.SONARSOURCE_QA</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-sonarqube-zip</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-application</artifactId>
- <version>${project.version}</version>
- <type>zip</type>
- <overWrite>true</overWrite>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.basedir}/../sonar-application/target</outputDirectory>
- <overWriteReleases>true</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
- <execution>
- <id>copy-xoo-plugin</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.sonarsource.sonarqube</groupId>
- <artifactId>sonar-xoo-plugin</artifactId>
- <version>${project.version}</version>
- <type>sonar-plugin</type>
- <overWrite>true</overWrite>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.basedir}/../plugins/sonar-xoo-plugin/target</outputDirectory>
- <overWriteReleases>true</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/tests/src/test/java/org/sonarqube/tests/Byteman.java b/tests/src/test/java/org/sonarqube/tests/Byteman.java
index f32647f153d..26e21b4a31b 100644
--- a/tests/src/test/java/org/sonarqube/tests/Byteman.java
+++ b/tests/src/test/java/org/sonarqube/tests/Byteman.java
@@ -20,11 +20,11 @@
package org.sonarqube.tests;
import com.sonar.orchestrator.OrchestratorBuilder;
+import com.sonar.orchestrator.util.NetworkUtils;
import java.io.File;
import java.net.InetAddress;
import java.util.Collections;
import org.jboss.byteman.agent.submit.Submit;
-import org.sonar.process.NetworkUtilsImpl;
import static java.lang.String.format;
@@ -50,16 +50,15 @@ public class Byteman {
public Byteman(OrchestratorBuilder builder, Process process) {
this.builder = builder;
String jar = findBytemanJar();
- port = NetworkUtilsImpl.INSTANCE.getNextAvailablePort(InetAddress.getLoopbackAddress());
+ port = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
String bytemanArg = format("-javaagent:%s=boot:%s,port:%d", jar, jar, port);
builder.setServerProperty(process.argument, bytemanArg);
}
private static String findBytemanJar() {
- // see pom.xml, Maven copies and renames the artifact.
- File jar = new File("target/byteman.jar");
+ File jar = new File("build/resources/test/byteman.jar");
if (!jar.exists()) {
- throw new IllegalStateException("Can't find " + jar + ". Please execute 'mvn generate-test-resources' once in directory tests/.");
+ throw new IllegalStateException("Can't find " + jar + ". Please execute './gradlew tests:processIntegrationTestResources'.");
}
return jar.getAbsolutePath();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/Category1Suite.java b/tests/src/test/java/org/sonarqube/tests/Category1Suite.java
index 89368b1488a..09e1edb94d4 100644
--- a/tests/src/test/java/org/sonarqube/tests/Category1Suite.java
+++ b/tests/src/test/java/org/sonarqube/tests/Category1Suite.java
@@ -29,6 +29,7 @@ import org.sonarqube.tests.settings.EmailsTest;
import org.sonarqube.tests.settings.PropertySetsTest;
import org.sonarqube.tests.settings.SettingsTest;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -48,7 +49,7 @@ import static util.ItUtils.xooPlugin;
public class Category1Suite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.setServerProperty("sonar.notifications.delay", "1")
.addPlugin(pluginArtifact("property-sets-plugin"))
.addPlugin(pluginArtifact("sonar-subcategories-plugin"))
@@ -67,9 +68,6 @@ public class Category1Suite {
.addPlugin(pluginArtifact("posttask-plugin"))
- // reduce memory for Elasticsearch to 128M
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.addPlugin(xooPlugin())
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/Category3Suite.java b/tests/src/test/java/org/sonarqube/tests/Category3Suite.java
index 2924b41373f..3a59293a07a 100644
--- a/tests/src/test/java/org/sonarqube/tests/Category3Suite.java
+++ b/tests/src/test/java/org/sonarqube/tests/Category3Suite.java
@@ -40,6 +40,7 @@ import org.sonarqube.tests.analysis.TempFolderTest;
import org.sonarqube.tests.plugins.VersionPluginTest;
import org.sonarqube.tests.webhook.WebhooksTest;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -70,7 +71,7 @@ import static util.ItUtils.xooPlugin;
public class Category3Suite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.setOrchestratorProperty("javaVersion", "LATEST_RELEASE").addPlugin("java")
@@ -89,9 +90,5 @@ public class Category3Suite {
// used by ProjectBuilderTest
.addPlugin(pluginArtifact("project-builder-plugin"))
- // reduce memory for Elasticsearch to 128M
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-// .setServerProperty("sonar.web.javaAdditionalOpts", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005")
-
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/Category4Suite.java b/tests/src/test/java/org/sonarqube/tests/Category4Suite.java
index 332ef87afe1..b0296eaf19c 100644
--- a/tests/src/test/java/org/sonarqube/tests/Category4Suite.java
+++ b/tests/src/test/java/org/sonarqube/tests/Category4Suite.java
@@ -39,6 +39,7 @@ import org.sonarqube.tests.ui.UiTest;
import org.sonarqube.tests.ws.WsLocalCallTest;
import org.sonarqube.tests.ws.WsTest;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -75,7 +76,7 @@ import static util.ItUtils.xooPlugin;
public class Category4Suite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
// Used in UiExtensionsTest
@@ -87,8 +88,7 @@ public class Category4Suite {
// Used by LogsTest
.setServerProperty("sonar.web.accessLogs.pattern", LogsTest.ACCESS_LOGS_PATTERN)
- // reduce memory for Elasticsearch to 128M
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
+ .setServerProperty("sonar.web.javaAdditionalOpts", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8001")
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/Category6Suite.java b/tests/src/test/java/org/sonarqube/tests/Category6Suite.java
index dd8ecd2876b..842aa61711c 100644
--- a/tests/src/test/java/org/sonarqube/tests/Category6Suite.java
+++ b/tests/src/test/java/org/sonarqube/tests/Category6Suite.java
@@ -39,6 +39,7 @@ import org.sonarqube.tests.rule.RulesMarkdownTest;
import org.sonarqube.tests.rule.RulesWsTest;
import org.sonarqube.tests.user.OrganizationIdentityProviderTest;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -70,7 +71,7 @@ public class Category6Suite {
public static final int SEARCH_HTTP_PORT = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
// for ES resiliency tests
.setServerProperty("sonar.search.httpPort", "" + SEARCH_HTTP_PORT)
@@ -82,8 +83,5 @@ public class Category6Suite {
.addPlugin(pluginArtifact("base-auth-plugin"))
.addPlugin(pluginArtifact("ui-extensions-plugin"))
- // reduce memory for Elasticsearch to 128M
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/analysis/AnalysisEsResilienceTest.java b/tests/src/test/java/org/sonarqube/tests/analysis/AnalysisEsResilienceTest.java
index 3385fad3a5a..eee7c8edf6b 100644
--- a/tests/src/test/java/org/sonarqube/tests/analysis/AnalysisEsResilienceTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/analysis/AnalysisEsResilienceTest.java
@@ -53,6 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
import static org.sonarqube.tests.Byteman.Process.CE;
import static org.sonarqube.ws.Ce.TaskStatus.FAILED;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.projectDir;
public class AnalysisEsResilienceTest {
@@ -63,7 +64,7 @@ public class AnalysisEsResilienceTest {
private static final int esHttpPort = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
static {
- byteman = new Byteman(Orchestrator.builderEnv(), CE);
+ byteman = new Byteman(newOrchestratorBuilder(), CE);
orchestrator = byteman
.getOrchestratorBuilder()
.addPlugin(ItUtils.xooPlugin())
diff --git a/tests/src/test/java/org/sonarqube/tests/authorization/AuthorizationSuite.java b/tests/src/test/java/org/sonarqube/tests/authorization/AuthorizationSuite.java
index f29f8d2e318..23c03e7888c 100644
--- a/tests/src/test/java/org/sonarqube/tests/authorization/AuthorizationSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/authorization/AuthorizationSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -33,6 +34,7 @@ import static util.ItUtils.xooPlugin;
IssuePermissionTest.class,
PermissionSearchTest.class,
PermissionTemplatePageTest.class,
+
ProvisioningPermissionTest.class,
QualityProfileAdminPermissionTest.class,
SystemPasscodeTest.class
@@ -40,10 +42,7 @@ import static util.ItUtils.xooPlugin;
public class AuthorizationSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
// for SystemPasscodeTest
// this privileged plugin provides the WS api/system_passcode/check
// that is used by the tests
@@ -52,5 +51,4 @@ public class AuthorizationSuite {
.addPlugin(xooPlugin())
.build();
-
}
diff --git a/tests/src/test/java/org/sonarqube/tests/ce/CeShutdownTest.java b/tests/src/test/java/org/sonarqube/tests/ce/CeShutdownTest.java
index 62dabd40247..ce8678dc292 100644
--- a/tests/src/test/java/org/sonarqube/tests/ce/CeShutdownTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/ce/CeShutdownTest.java
@@ -37,6 +37,7 @@ import util.ItUtils;
import static com.google.common.base.Preconditions.checkState;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
public class CeShutdownTest {
@@ -115,7 +116,7 @@ public class CeShutdownTest {
pauseFile = temp.newFile();
FileUtils.touch(pauseFile);
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.setServerProperty("sonar.ce.pauseTask.path", pauseFile.getAbsolutePath())
.setServerProperty("sonar.ce.gracefulStopTimeOutInMs", "" + timeOutInMs)
.addPlugin(ItUtils.xooPlugin())
diff --git a/tests/src/test/java/org/sonarqube/tests/ce/CeWorkersTest.java b/tests/src/test/java/org/sonarqube/tests/ce/CeWorkersTest.java
index 82453df03d6..64d85836fdb 100644
--- a/tests/src/test/java/org/sonarqube/tests/ce/CeWorkersTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/ce/CeWorkersTest.java
@@ -58,6 +58,7 @@ import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.assertj.core.api.Assertions.assertThat;
import static util.ItUtils.newAdminWsClient;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -82,7 +83,7 @@ public class CeWorkersTest {
public static void setUp() throws Exception {
sharedMemory = temporaryFolder.newFile();
- OrchestratorBuilder builder = Orchestrator.builderEnv()
+ OrchestratorBuilder builder = newOrchestratorBuilder()
.addPlugin(pluginArtifact("fake-governance-plugin"))
.setServerProperty("fakeGoverance.workerLatch.sharedMemoryFile", sharedMemory.getAbsolutePath())
// overwrite default value to display heap dump on OOM and reduce max heap
diff --git a/tests/src/test/java/org/sonarqube/tests/component/ComponentSuite.java b/tests/src/test/java/org/sonarqube/tests/component/ComponentSuite.java
index 5053112626c..0384ce9562b 100644
--- a/tests/src/test/java/org/sonarqube/tests/component/ComponentSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/component/ComponentSuite.java
@@ -23,6 +23,7 @@ import com.sonar.orchestrator.Orchestrator;
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import util.ItUtils;
import static util.ItUtils.xooPlugin;
@@ -35,9 +36,7 @@ import static util.ItUtils.xooPlugin;
public class ComponentSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
+ public static final Orchestrator ORCHESTRATOR = ItUtils.newOrchestratorBuilder()
.addPlugin(xooPlugin())
diff --git a/tests/src/test/java/org/sonarqube/tests/duplication/DuplicationSuite.java b/tests/src/test/java/org/sonarqube/tests/duplication/DuplicationSuite.java
index bbe5e540ea6..e8c1833f402 100644
--- a/tests/src/test/java/org/sonarqube/tests/duplication/DuplicationSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/duplication/DuplicationSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
@@ -36,11 +37,8 @@ import static util.ItUtils.xooPlugin;
})
public class DuplicationSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
- // reduce Elasticsearch memory
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/issue/IssueCreationDatePluginChangedTest.java b/tests/src/test/java/org/sonarqube/tests/issue/IssueCreationDatePluginChangedTest.java
index af2fbd1e1a6..cff4e0f1aa5 100644
--- a/tests/src/test/java/org/sonarqube/tests/issue/IssueCreationDatePluginChangedTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/issue/IssueCreationDatePluginChangedTest.java
@@ -43,6 +43,7 @@ import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.newUserWsClient;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.projectDir;
@@ -68,7 +69,7 @@ public class IssueCreationDatePluginChangedTest {
private static final String USER_EMAIL = "tester@example.org";
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.addPlugin(ItUtils.pluginArtifact("backdating-plugin-v1"))
.addPlugin(ItUtils.pluginArtifact("backdating-customplugin"))
diff --git a/tests/src/test/java/org/sonarqube/tests/issue/IssueSuite.java b/tests/src/test/java/org/sonarqube/tests/issue/IssueSuite.java
index ed6bf7a60a7..8ff714fe6e3 100644
--- a/tests/src/test/java/org/sonarqube/tests/issue/IssueSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/issue/IssueSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -51,7 +52,7 @@ import static util.ItUtils.xooPlugin;
public class IssueSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.setServerProperty("sonar.search.httpPort", "9025")
.addPlugin(xooPlugin())
@@ -63,9 +64,6 @@ public class IssueSuite {
.setServerProperty("organization.enabled", "true")
- // reduce memory for Elasticsearch to 128M
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssueSuite.java b/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssueSuite.java
index 2babb0d1985..85381682159 100644
--- a/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssueSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssueSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
@@ -33,12 +34,9 @@ import static util.ItUtils.xooPlugin;
public class OrganizationIssueSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
- // reduce memory for Elasticsearch to 128M
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/lite/LiteTest.java b/tests/src/test/java/org/sonarqube/tests/lite/LiteTest.java
index 8551fd35d3c..0c89f7cd8fe 100644
--- a/tests/src/test/java/org/sonarqube/tests/lite/LiteTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/lite/LiteTest.java
@@ -38,6 +38,7 @@ import org.sonarqube.ws.client.measures.MeasuresService;
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.runProjectAnalysis;
import static util.ItUtils.xooPlugin;
@@ -45,7 +46,7 @@ public class LiteTest {
private static final String PROJECT_KEY = "com.sonarsource.it.samples:multi-modules-sample";
- private static Orchestrator orchestrator = Orchestrator.builderEnv()
+ private static Orchestrator orchestrator = newOrchestratorBuilder()
.setOrchestratorProperty("sonar.web.context", "/sonarqube")
.addPlugin(xooPlugin())
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/marketplace/UpdateCenterTest.java b/tests/src/test/java/org/sonarqube/tests/marketplace/UpdateCenterTest.java
index e1c851aaae1..8e50a080451 100644
--- a/tests/src/test/java/org/sonarqube/tests/marketplace/UpdateCenterTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/marketplace/UpdateCenterTest.java
@@ -28,6 +28,7 @@ import org.sonarqube.qa.util.pageobjects.MarketplacePage;
import org.sonarqube.qa.util.pageobjects.Navigation;
import util.user.UserRule;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
/**
@@ -36,7 +37,7 @@ import static util.ItUtils.pluginArtifact;
public class UpdateCenterTest {
@ClassRule
- public static final Orchestrator orchestrator = Orchestrator.builderEnv()
+ public static final Orchestrator orchestrator = newOrchestratorBuilder()
.setServerProperty("sonar.updatecenter.url", UpdateCenterTest.class.getResource("/marketplace/UpdateCenterTest/update-center.properties").toString())
.addPlugin(pluginArtifact("sonar-fake-plugin"))
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/measure/MeasureSuite.java b/tests/src/test/java/org/sonarqube/tests/measure/MeasureSuite.java
index 7bd56dc9686..ea6ad5d0e7f 100644
--- a/tests/src/test/java/org/sonarqube/tests/measure/MeasureSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/measure/MeasureSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -44,10 +45,7 @@ import static util.ItUtils.xooPlugin;
public class MeasureSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
// used by DecimalScaleMetricTest
diff --git a/tests/src/test/java/org/sonarqube/tests/organization/OrganizationSuite.java b/tests/src/test/java/org/sonarqube/tests/organization/OrganizationSuite.java
index 7511f41200c..024a8849b41 100644
--- a/tests/src/test/java/org/sonarqube/tests/organization/OrganizationSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/organization/OrganizationSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -40,14 +41,11 @@ import static util.ItUtils.xooPlugin;
public class OrganizationSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.addPlugin(pluginArtifact("fake-billing-plugin"))
.addPlugin(pluginArtifact("ui-extensions-plugin"))
-
- // reduce memory for Elasticsearch to 128M
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/performance/scanner/ScannerPerformanceSuite.java b/tests/src/test/java/org/sonarqube/tests/performance/scanner/ScannerPerformanceSuite.java
index 1b789600e24..918cb4ba7a6 100644
--- a/tests/src/test/java/org/sonarqube/tests/performance/scanner/ScannerPerformanceSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/performance/scanner/ScannerPerformanceSuite.java
@@ -29,6 +29,9 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.sonarqube.tests.performance.AbstractPerfTest;
+import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.xooPlugin;
+
@RunWith(Suite.class)
@Suite.SuiteClasses({
BootstrappingTest.class,
@@ -41,9 +44,8 @@ import org.sonarqube.tests.performance.AbstractPerfTest;
public class ScannerPerformanceSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator
- .builderEnv()
- .addPlugin(FileLocation.byWildcardMavenFilename(new File("../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar"))
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
+ .addPlugin(xooPlugin())
// should not be so high, but required as long embedded h2 is used -> requires more memory on server
.setServerProperty("sonar.web.javaOpts", "-Xmx1G -XX:+HeapDumpOnOutOfMemoryError")
// Needed by DuplicationTest::hugeJavaFile
diff --git a/tests/src/test/java/org/sonarqube/tests/performance/server/ComputeEnginePerfTest.java b/tests/src/test/java/org/sonarqube/tests/performance/server/ComputeEnginePerfTest.java
index 7ee7fa84624..f6e15a279a1 100644
--- a/tests/src/test/java/org/sonarqube/tests/performance/server/ComputeEnginePerfTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/performance/server/ComputeEnginePerfTest.java
@@ -34,6 +34,9 @@ import org.junit.rules.TemporaryFolder;
import org.sonarqube.tests.performance.AbstractPerfTest;
import org.sonarqube.tests.performance.ServerLogs;
+import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.xooPlugin;
+
public class ComputeEnginePerfTest extends AbstractPerfTest {
private static int MAX_HEAP_SIZE_IN_MEGA = 600;
@@ -41,9 +44,8 @@ public class ComputeEnginePerfTest extends AbstractPerfTest {
public static TemporaryFolder temp = new TemporaryFolder();
@ClassRule
- public static Orchestrator orchestrator = Orchestrator
- .builderEnv()
- .addPlugin(FileLocation.byWildcardMavenFilename(new File("../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar"))
+ public static Orchestrator orchestrator = newOrchestratorBuilder()
+ .addPlugin(xooPlugin())
.setServerProperty(
"sonar.web.javaOpts",
String.format("-Xms%dm -Xmx%dm -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true", MAX_HEAP_SIZE_IN_MEGA, MAX_HEAP_SIZE_IN_MEGA))
diff --git a/tests/src/test/java/org/sonarqube/tests/performance/server/ServerPerfTest.java b/tests/src/test/java/org/sonarqube/tests/performance/server/ServerPerfTest.java
index 3de0d05c8cc..2d147551db5 100644
--- a/tests/src/test/java/org/sonarqube/tests/performance/server/ServerPerfTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/performance/server/ServerPerfTest.java
@@ -33,6 +33,8 @@ import org.sonarqube.tests.performance.AbstractPerfTest;
import org.sonarqube.tests.performance.ServerLogs;
import static org.apache.commons.io.FileUtils.readLines;
+import static util.ItUtils.newOrchestratorBuilder;
+import static util.ItUtils.xooPlugin;
public class ServerPerfTest extends AbstractPerfTest {
private static final int TIMEOUT_3_MINUTES = 1000 * 60 * 3;
@@ -44,8 +46,8 @@ public class ServerPerfTest extends AbstractPerfTest {
@Test
public void server_startup_and_shutdown() throws Exception {
String defaultWebJavaOptions = "-Xmx768m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8";
- Orchestrator orchestrator = Orchestrator.builderEnv()
- .addPlugin(FileLocation.byWildcardMavenFilename(new File("../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar"))
+ Orchestrator orchestrator = newOrchestratorBuilder()
+ .addPlugin(xooPlugin())
// See http://wiki.apache.org/tomcat/HowTo/FasterStartUp
// Sometimes source of entropy is too small and Tomcat spends ~20 seconds on the step :
diff --git a/tests/src/test/java/org/sonarqube/tests/plugins/CompressPluginsTest.java b/tests/src/test/java/org/sonarqube/tests/plugins/CompressPluginsTest.java
index ca57e9fc7e4..f2601bdaa1a 100644
--- a/tests/src/test/java/org/sonarqube/tests/plugins/CompressPluginsTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/plugins/CompressPluginsTest.java
@@ -24,7 +24,6 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.build.SonarScanner;
-import org.json.JSONException;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
@@ -34,6 +33,7 @@ import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.WsResponse;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.projectDir;
import static util.ItUtils.xooPlugin;
@@ -42,7 +42,7 @@ import static util.ItUtils.xooPlugin;
*/
public class CompressPluginsTest {
@ClassRule
- public static Orchestrator orchestrator = Orchestrator.builderEnv()
+ public static Orchestrator orchestrator = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.setServerProperty("sonar.pluginsCompression.enable", "true")
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java b/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java
index eb32eebbc6c..bcde9c81ca2 100644
--- a/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java
@@ -24,8 +24,6 @@ import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.build.BuildResult;
import com.sonar.orchestrator.build.SonarScanner;
import com.sonar.orchestrator.locator.MavenLocation;
-import java.io.File;
-import java.net.MalformedURLException;
import java.util.Arrays;
import java.util.List;
import org.junit.BeforeClass;
@@ -50,8 +48,8 @@ import org.sonarqube.tests.plugins.checks.SwiftCheck;
import org.sonarqube.tests.plugins.checks.Validation;
import org.sonarqube.tests.plugins.checks.WebCheck;
-import static com.sonar.orchestrator.locator.FileLocation.byWildcardMavenFilename;
import static org.assertj.core.api.Assertions.fail;
+import static util.ItUtils.newOrchestratorBuilder;
/**
* Verify that latest releases of the plugins available in update center
@@ -83,8 +81,7 @@ public class PluginsTest {
@BeforeClass
public static void startServer() {
- OrchestratorBuilder builder = Orchestrator.builderEnv()
- .setZipFile(byWildcardMavenFilename(new File("../sonar-application/target"), "sonar*.zip").getFile());
+ OrchestratorBuilder builder = newOrchestratorBuilder();
builder.addPlugin(MavenLocation.of("com.sonarsource.license", "sonar-dev-license-plugin", "3.2.0.1163"));
diff --git a/tests/src/test/java/org/sonarqube/tests/project/ProjectSuite.java b/tests/src/test/java/org/sonarqube/tests/project/ProjectSuite.java
index 575f42abf47..eaf2ba850be 100644
--- a/tests/src/test/java/org/sonarqube/tests/project/ProjectSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/project/ProjectSuite.java
@@ -26,6 +26,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -50,9 +51,7 @@ public class ProjectSuite {
static final int SEARCH_HTTP_PORT = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
// for ES resiliency tests
.setServerProperty("sonar.search.httpPort", "" + SEARCH_HTTP_PORT)
.setServerProperty("sonar.search.recovery.delayInMs", "1000")
diff --git a/tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectSuite.java b/tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectSuite.java
index 872029f36d6..d65f7b52c37 100644
--- a/tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/project/SonarCloudProjectSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
@@ -33,7 +34,7 @@ import static util.ItUtils.xooPlugin;
public class SonarCloudProjectSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.setServerProperty("sonar.sonarcloud.enabled", "true")
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateSuite.java b/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateSuite.java
index 574957407de..985f8b3a3dc 100644
--- a/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -36,13 +37,10 @@ import static util.ItUtils.xooPlugin;
public class OrganizationQualityGateSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
// required for notification tests
.setServerProperty("sonar.notifications.delay", "1")
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.addPlugin(pluginArtifact("posttask-plugin"))
.addPlugin(xooPlugin())
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateSuite.java b/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateSuite.java
index 3ce87ad9528..910144e75cb 100644
--- a/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -38,13 +39,10 @@ import static util.ItUtils.xooPlugin;
public class QualityGateSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
// required for notification tests
.setServerProperty("sonar.notifications.delay", "1")
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.addPlugin(pluginArtifact("posttask-plugin"))
.addPlugin(xooPlugin())
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/qualityModel/QualityModelSuite.java b/tests/src/test/java/org/sonarqube/tests/qualityModel/QualityModelSuite.java
index c7431a8bbff..b796cfe6b84 100644
--- a/tests/src/test/java/org/sonarqube/tests/qualityModel/QualityModelSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/qualityModel/QualityModelSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
@@ -40,12 +41,9 @@ import static util.ItUtils.xooPlugin;
public class QualityModelSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/qualityProfile/ActiveRuleEsResilienceTest.java b/tests/src/test/java/org/sonarqube/tests/qualityProfile/ActiveRuleEsResilienceTest.java
index 869beb0154b..44a91226fda 100644
--- a/tests/src/test/java/org/sonarqube/tests/qualityProfile/ActiveRuleEsResilienceTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/qualityProfile/ActiveRuleEsResilienceTest.java
@@ -38,6 +38,7 @@ import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonarqube.tests.Byteman.Process.WEB;
+import static util.ItUtils.newOrchestratorBuilder;
public class ActiveRuleEsResilienceTest {
private static final String RULE_ONE_BUG_PER_LINE = "xoo:OneBugIssuePerLine";
@@ -47,7 +48,7 @@ public class ActiveRuleEsResilienceTest {
private static final Byteman byteman;
static {
- byteman = new Byteman(Orchestrator.builderEnv(), WEB);
+ byteman = new Byteman(newOrchestratorBuilder(), WEB);
orchestrator = byteman
.getOrchestratorBuilder()
.setServerProperty("sonar.search.recovery.delayInMs", "1000")
diff --git a/tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java b/tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java
index 2eb34952fa4..861beecbe53 100644
--- a/tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java
@@ -41,6 +41,7 @@ import util.user.UserRule;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
public class BuiltInQualityProfilesNotificationTest {
@@ -67,7 +68,7 @@ public class BuiltInQualityProfilesNotificationTest {
@Test
public void does_not_send_mail_if_no_quality_profile_is_updated() throws Exception {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("foo-plugin-v1"))
.setServerProperty("email.smtp_host.secured", "localhost")
.setServerProperty("email.smtp_port.secured", Integer.toString(smtpServer.getServer().getPort()))
@@ -86,7 +87,7 @@ public class BuiltInQualityProfilesNotificationTest {
@Test
public void send_mail_if_quality_profile_is_updated() throws Exception {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("foo-plugin-v1"))
.setServerProperty("sonar.notifications.delay", "1")
.setServerProperty("email.smtp_host.secured", "localhost")
@@ -174,7 +175,7 @@ public class BuiltInQualityProfilesNotificationTest {
@Test
public void do_not_send_mail_if_notifications_are_disabled_in_settings() throws Exception {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("foo-plugin-v1"))
.setServerProperty("sonar.builtInQualityProfiles.disableNotificationOnUpdate", "true")
.setServerProperty("email.smtp_host.secured", "localhost")
diff --git a/tests/src/test/java/org/sonarqube/tests/rule/RuleEsResilienceTest.java b/tests/src/test/java/org/sonarqube/tests/rule/RuleEsResilienceTest.java
index 2efd49948ce..1163564bbba 100644
--- a/tests/src/test/java/org/sonarqube/tests/rule/RuleEsResilienceTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/rule/RuleEsResilienceTest.java
@@ -38,6 +38,7 @@ import util.ItUtils;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonarqube.tests.Byteman.Process.WEB;
+import static util.ItUtils.newOrchestratorBuilder;
public class RuleEsResilienceTest {
@@ -46,7 +47,7 @@ public class RuleEsResilienceTest {
private static final Byteman byteman;
static {
- byteman = new Byteman(Orchestrator.builderEnv(), WEB);
+ byteman = new Byteman(newOrchestratorBuilder(), WEB);
orchestrator = byteman
.getOrchestratorBuilder()
.setServerProperty("sonar.search.recovery.delayInMs", "1000")
diff --git a/tests/src/test/java/org/sonarqube/tests/rule/RuleReKeyingTest.java b/tests/src/test/java/org/sonarqube/tests/rule/RuleReKeyingTest.java
index ddff401dcc1..6576d0ec924 100644
--- a/tests/src/test/java/org/sonarqube/tests/rule/RuleReKeyingTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/rule/RuleReKeyingTest.java
@@ -40,6 +40,7 @@ import org.sonarqube.ws.client.issues.SearchRequest;
import static java.util.Collections.singletonList;
import static java.util.stream.Collectors.toSet;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.projectDir;
@@ -60,7 +61,7 @@ public class RuleReKeyingTest {
@Test
public void rules_are_re_keyed_when_upgrading_and_downgrading_plugin() {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("foo-plugin-v1"))
.build();
orchestrator.start();
diff --git a/tests/src/test/java/org/sonarqube/tests/serverSystem/RestartTest.java b/tests/src/test/java/org/sonarqube/tests/serverSystem/RestartTest.java
index 010ba984229..532925b7c50 100644
--- a/tests/src/test/java/org/sonarqube/tests/serverSystem/RestartTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/serverSystem/RestartTest.java
@@ -29,7 +29,6 @@ import org.junit.rules.DisableOnDebug;
import org.junit.rules.ExpectedException;
import org.junit.rules.TestRule;
import org.junit.rules.Timeout;
-import org.sonarqube.qa.util.Tester;
import org.sonarqube.ws.System;
import org.sonarqube.ws.client.PostRequest;
import org.sonarqube.ws.client.WsClient;
@@ -39,6 +38,7 @@ import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import static util.ItUtils.newAdminWsClient;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.newWsClient;
/**
@@ -64,7 +64,7 @@ public class RestartTest {
public void restart_in_prod_mode_requires_sysadmin_permission_and_restarts() throws Exception {
// server classloader locks Jar files on Windows
if (!SystemUtils.IS_OS_WINDOWS) {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.setOrchestratorProperty("orchestrator.keepWorkspace", "true")
.build();
orchestrator.start();
diff --git a/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemRestartingOrchestrator.java b/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemRestartingOrchestrator.java
index 161456b209a..ed4fd75d914 100644
--- a/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemRestartingOrchestrator.java
+++ b/tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemRestartingOrchestrator.java
@@ -33,6 +33,7 @@ import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import static util.ItUtils.newAdminWsClient;
+import static util.ItUtils.newOrchestratorBuilder;
/**
* This class start a new orchestrator on each test case
@@ -57,7 +58,7 @@ public class ServerSystemRestartingOrchestrator {
@Test
public void check_minimal_sonar_version_at_startup() throws Exception {
try {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(FileLocation.of(new File(ServerSystemRestartingOrchestrator.class.getResource("/serverSystem/ServerSystemTest/incompatible-plugin-1.0.jar").toURI())))
.build();
orchestrator.start();
@@ -70,9 +71,9 @@ public class ServerSystemRestartingOrchestrator {
@Test
public void support_install_dir_with_whitespaces() throws Exception {
- String dirName = "target/has space";
+ String dirName = "build/distributions/has space";
FileUtils.deleteDirectory(new File(dirName));
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.setOrchestratorProperty("orchestrator.workspaceDir", dirName)
.build();
orchestrator.start();
@@ -83,7 +84,7 @@ public class ServerSystemRestartingOrchestrator {
// SONAR-4748
@Test
public void should_create_in_temp_folder() throws Exception {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(ItUtils.pluginArtifact("server-plugin"))
.setServerProperty("sonar.createTempFiles", "true")
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/serverSystem/SystemStateTest.java b/tests/src/test/java/org/sonarqube/tests/serverSystem/SystemStateTest.java
index 94d9fc77b29..7a2ee2e42a5 100644
--- a/tests/src/test/java/org/sonarqube/tests/serverSystem/SystemStateTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/serverSystem/SystemStateTest.java
@@ -41,6 +41,7 @@ import org.sonarqube.ws.client.WsClient;
import static com.google.common.base.Preconditions.checkState;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.newSystemUserWsClient;
import static util.ItUtils.newWsClient;
import static util.ItUtils.pluginArtifact;
@@ -128,7 +129,7 @@ public class SystemStateTest {
void start(Lock lock) {
checkState(orchestrator == null);
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("server-plugin"))
.setServerProperty("sonar.web.startupLock.path", lock.webFile.getAbsolutePath())
.setServerProperty("sonar.ce.startupLock.path", lock.ceFile.getAbsolutePath())
diff --git a/tests/src/test/java/org/sonarqube/tests/settings/SettingsTestRestartingOrchestrator.java b/tests/src/test/java/org/sonarqube/tests/settings/SettingsTestRestartingOrchestrator.java
index 8aee5ebb876..1c4f5a88e3e 100644
--- a/tests/src/test/java/org/sonarqube/tests/settings/SettingsTestRestartingOrchestrator.java
+++ b/tests/src/test/java/org/sonarqube/tests/settings/SettingsTestRestartingOrchestrator.java
@@ -21,7 +21,6 @@ package org.sonarqube.tests.settings;
import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.build.SonarScanner;
-import java.io.UnsupportedEncodingException;
import java.net.URL;
import org.junit.After;
import org.junit.Rule;
@@ -33,6 +32,7 @@ import util.user.UserRule;
import static com.codeborne.selenide.Condition.visible;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.projectDir;
import static util.ItUtils.xooPlugin;
@@ -60,7 +60,7 @@ public class SettingsTestRestartingOrchestrator {
@Test
public void test_settings() {
URL secretKeyUrl = getClass().getResource("/settings/SettingsTest/sonar-secret.txt");
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("settings-plugin"))
.addPlugin(pluginArtifact("license-plugin"))
.setServerProperty("sonar.secretKeyPath", secretKeyUrl.getFile())
@@ -86,7 +86,7 @@ public class SettingsTestRestartingOrchestrator {
@Test
public void property_relocation() {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("property-relocation-plugin"))
.addPlugin(xooPlugin())
.setServerProperty("sonar.deprecatedKey", "true")
diff --git a/tests/src/test/java/org/sonarqube/tests/source/SourceSuite.java b/tests/src/test/java/org/sonarqube/tests/source/SourceSuite.java
index fbcb1885bf9..070a0fc941e 100644
--- a/tests/src/test/java/org/sonarqube/tests/source/SourceSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/source/SourceSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
@@ -37,9 +38,7 @@ import static util.ItUtils.xooPlugin;
public class SourceSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator
- .builderEnv()
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.setOrchestratorProperty("scmgitVersion", "LATEST_RELEASE")
.addPlugin(xooPlugin())
.addPlugin("scmgit")
diff --git a/tests/src/test/java/org/sonarqube/tests/startup/StartupIndexationTest.java b/tests/src/test/java/org/sonarqube/tests/startup/StartupIndexationTest.java
index 643a0ff12d5..f654949bd26 100644
--- a/tests/src/test/java/org/sonarqube/tests/startup/StartupIndexationTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/startup/StartupIndexationTest.java
@@ -38,6 +38,7 @@ import org.sonarqube.ws.Users;
import org.sonarqube.ws.client.users.SearchRequest;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
public class StartupIndexationTest {
@@ -81,7 +82,7 @@ public class StartupIndexationTest {
pauseFile = temp.newFile();
FileUtils.touch(pauseFile);
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.setServerProperty("sonar.web.pause.path", pauseFile.getAbsolutePath())
.addPlugin(pluginArtifact("wait-at-platform-level4-plugin"))
.setStartupLogWatcher(l -> l.contains("PlatformLevel4 initialization phase is paused"))
diff --git a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java
index 1cd6186184d..a827baa6282 100644
--- a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryOptOutTest.java
@@ -32,13 +32,14 @@ import org.sonarqube.ws.client.GetRequest;
import static org.assertj.core.api.Assertions.assertThat;
import static util.ItUtils.jsonToMap;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
public class TelemetryOptOutTest {
public static MockWebServer server = new MockWebServer();
- private static Orchestrator orchestrator = Orchestrator.builderEnv()
+ private static Orchestrator orchestrator = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.setServerProperty("sonar.telemetry.enable", "false")
.setServerProperty("sonar.telemetry.url", server.url("").toString())
diff --git a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java
index 8e8a9007f59..fd17f385112 100644
--- a/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/telemetry/TelemetryUploadTest.java
@@ -37,6 +37,7 @@ import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
import static util.ItUtils.jsonToMap;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.runProjectAnalysis;
import static util.ItUtils.xooPlugin;
@@ -60,7 +61,7 @@ public class TelemetryUploadTest {
@Test
public void sent_telemetry_data() throws Exception {
telemetryServer.enqueue(new MockResponse().setResponseCode(200));
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.setServerProperty("sonar.telemetry.url", telemetryServer.url("").toString())
// increase frequency so that payload is sent quickly after startup
@@ -104,7 +105,7 @@ public class TelemetryUploadTest {
@Test
public void does_not_send_telemetry_data_right_away_by_Default() {
- orchestrator = Orchestrator.builderEnv()
+ orchestrator = newOrchestratorBuilder()
.addPlugin(xooPlugin())
.setServerProperty("sonar.telemetry.url", telemetryServer.url("").toString())
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/test/TestSuite.java b/tests/src/test/java/org/sonarqube/tests/test/TestSuite.java
index 8afec8fdf6a..9afbbfa2de9 100644
--- a/tests/src/test/java/org/sonarqube/tests/test/TestSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/test/TestSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
@@ -36,12 +37,9 @@ import static util.ItUtils.xooPlugin;
public class TestSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
- // reduce memory for Elasticsearch
- .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
-
.build();
}
diff --git a/tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java b/tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java
index 0828b039b11..8d79898aa13 100644
--- a/tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java
@@ -25,7 +25,7 @@ import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.build.MavenBuild;
import com.sonar.orchestrator.container.Server;
-import com.sonar.orchestrator.locator.FileLocation;
+import com.sonar.orchestrator.locator.MavenLocation;
import com.sonar.orchestrator.version.Version;
import java.io.File;
import java.io.IOException;
@@ -53,6 +53,8 @@ import static java.lang.Integer.parseInt;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
+
public class UpgradeTest {
private static final String PROJECT_KEY = "org.apache.struts:struts-parent";
@@ -70,8 +72,8 @@ public class UpgradeTest {
}
@Test
- public void test_upgrade_from_5_6_1() {
- testDatabaseUpgrade(Version.create("5.6.1"));
+ public void test_upgrade_from_6_7() {
+ testDatabaseUpgrade(Version.create("6.7"));
}
private void testDatabaseUpgrade(Version fromVersion) {
@@ -152,8 +154,8 @@ public class UpgradeTest {
OrchestratorBuilder builder = Orchestrator.builderEnv()
.setSonarVersion(sqVersion.toString())
.setOrchestratorProperty("orchestrator.keepDatabase", String.valueOf(keepDatabase))
- .setOrchestratorProperty("javaVersion", "3.14")
- .addPlugin("java")
+ .setOrchestratorProperty("orchestrator.workspaceDir", "build/it")
+ .addPlugin(MavenLocation.of("org.sonarsource.java", "sonar-java-plugin", "5.1.0.13090"))
.setStartupLogWatcher(log -> log.contains("Process[web] is up"));
orchestrator = builder.build();
orchestrator.start();
@@ -161,8 +163,7 @@ public class UpgradeTest {
}
private void startAndUpgradeDevServer() {
- OrchestratorBuilder builder = Orchestrator.builderEnv()
- .setZipFile(FileLocation.byWildcardMavenFilename(new File("../sonar-application/target"), "sonar*.zip").getFile())
+ OrchestratorBuilder builder = newOrchestratorBuilder()
.setOrchestratorProperty("orchestrator.keepDatabase", "true")
.setOrchestratorProperty("javaVersion", LATEST_JAVA_RELEASE)
.addPlugin("java")
diff --git a/tests/src/test/java/org/sonarqube/tests/user/OnboardingTest.java b/tests/src/test/java/org/sonarqube/tests/user/OnboardingTest.java
index e7c709f1237..440e0d4bba6 100644
--- a/tests/src/test/java/org/sonarqube/tests/user/OnboardingTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/user/OnboardingTest.java
@@ -30,13 +30,14 @@ import org.sonarqube.ws.client.users.DeactivateRequest;
import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
+import static util.ItUtils.newOrchestratorBuilder;
public class OnboardingTest {
private static final String ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS = "sonar.onboardingTutorial.showToNewUsers";
@ClassRule
- public static final Orchestrator orchestrator = Orchestrator.builderEnv().build();
+ public static final Orchestrator orchestrator = newOrchestratorBuilder().build();
@Rule
public Tester tester = new Tester(orchestrator).disableOrganizations();
diff --git a/tests/src/test/java/org/sonarqube/tests/user/RealmAuthenticationTest.java b/tests/src/test/java/org/sonarqube/tests/user/RealmAuthenticationTest.java
index e5586b474e2..c0f14d8e6a3 100644
--- a/tests/src/test/java/org/sonarqube/tests/user/RealmAuthenticationTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/user/RealmAuthenticationTest.java
@@ -51,6 +51,7 @@ import static java.net.HttpURLConnection.HTTP_OK;
import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.newUserWsClient;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.resetSettings;
@@ -76,7 +77,7 @@ public class RealmAuthenticationTest {
private static final String USERS_PROPERTY = "sonar.fakeauthenticator.users";
@ClassRule
- public static final Orchestrator orchestrator = Orchestrator.builderEnv()
+ public static final Orchestrator orchestrator = newOrchestratorBuilder()
.addPlugin(pluginArtifact("security-plugin"))
.setServerProperty("sonar.security.realm", "FakeRealm")
.build();
diff --git a/tests/src/test/java/org/sonarqube/tests/user/SsoAuthenticationTest.java b/tests/src/test/java/org/sonarqube/tests/user/SsoAuthenticationTest.java
index 07159881842..146f37ea777 100644
--- a/tests/src/test/java/org/sonarqube/tests/user/SsoAuthenticationTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/user/SsoAuthenticationTest.java
@@ -34,6 +34,7 @@ import util.user.UserRule;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
import static util.ItUtils.call;
+import static util.ItUtils.newOrchestratorBuilder;
/**
* Test SSO authentication (using HTTP headers).
@@ -56,7 +57,7 @@ public class SsoAuthenticationTest {
static final String GROUP_3 = "group-3";
@ClassRule
- public static final Orchestrator orchestrator = Orchestrator.builderEnv()
+ public static final Orchestrator orchestrator = newOrchestratorBuilder()
.setServerProperty("sonar.web.sso.enable", "true")
.setServerProperty("sonar.web.sso.loginHeader", LOGIN_HEADER)
.setServerProperty("sonar.web.sso.nameHeader", NAME_HEADER)
diff --git a/tests/src/test/java/org/sonarqube/tests/user/UserEsResilienceTest.java b/tests/src/test/java/org/sonarqube/tests/user/UserEsResilienceTest.java
index ca5516f3896..92ff670f0e3 100644
--- a/tests/src/test/java/org/sonarqube/tests/user/UserEsResilienceTest.java
+++ b/tests/src/test/java/org/sonarqube/tests/user/UserEsResilienceTest.java
@@ -39,6 +39,7 @@ import util.ItUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonarqube.tests.Byteman.Process.WEB;
import static util.ItUtils.expectHttpError;
+import static util.ItUtils.newOrchestratorBuilder;
public class UserEsResilienceTest {
@@ -47,7 +48,7 @@ public class UserEsResilienceTest {
private static final Byteman byteman;
static {
- byteman = new Byteman(Orchestrator.builderEnv(), WEB);
+ byteman = new Byteman(newOrchestratorBuilder(), WEB);
orchestrator = byteman
.getOrchestratorBuilder()
.setServerProperty("sonar.search.recovery.delayInMs", "1000")
diff --git a/tests/src/test/java/org/sonarqube/tests/user/UserSuite.java b/tests/src/test/java/org/sonarqube/tests/user/UserSuite.java
index 4eb7d0138dd..0f448dd9a7a 100644
--- a/tests/src/test/java/org/sonarqube/tests/user/UserSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/user/UserSuite.java
@@ -25,6 +25,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.pluginArtifact;
import static util.ItUtils.xooPlugin;
@@ -44,7 +45,7 @@ import static util.ItUtils.xooPlugin;
public class UserSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
// Used in BaseIdentityProviderTest
diff --git a/tests/src/test/java/org/sonarqube/tests/webhook/WebhooksSuite.java b/tests/src/test/java/org/sonarqube/tests/webhook/WebhooksSuite.java
index 6412ec5c48e..e3bc89f9269 100644
--- a/tests/src/test/java/org/sonarqube/tests/webhook/WebhooksSuite.java
+++ b/tests/src/test/java/org/sonarqube/tests/webhook/WebhooksSuite.java
@@ -24,6 +24,7 @@ import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
+import static util.ItUtils.newOrchestratorBuilder;
import static util.ItUtils.xooPlugin;
@RunWith(Suite.class)
@@ -34,7 +35,7 @@ import static util.ItUtils.xooPlugin;
public class WebhooksSuite {
@ClassRule
- public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
+ public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
.addPlugin(xooPlugin())
// reduce memory for Elasticsearch
diff --git a/tests/src/test/java/util/ItUtils.java b/tests/src/test/java/util/ItUtils.java
index d91c8e37872..a5c763180de 100644
--- a/tests/src/test/java/util/ItUtils.java
+++ b/tests/src/test/java/util/ItUtils.java
@@ -25,6 +25,7 @@ import com.google.common.collect.ImmutableMap;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.build.BuildResult;
import com.sonar.orchestrator.build.SonarRunner;
import com.sonar.orchestrator.container.Server;
@@ -54,6 +55,7 @@ import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
@@ -96,8 +98,23 @@ public class ItUtils {
private ItUtils() {
}
+ public static OrchestratorBuilder newOrchestratorBuilder() {
+ OrchestratorBuilder builder = Orchestrator.builderEnv();
+ String version = System.getProperty("sonar.runtimeVersion");
+ if (StringUtils.isEmpty(version)) {
+ File zip = FileLocation.byWildcardMavenFilename(new File("../sonar-application/build/distributions"), "sonar-application-*.zip").getFile();
+ builder.setZipFile(zip);
+ } else {
+ builder.setSonarVersion(version);
+ }
+ return builder
+ // reduce memory for Elasticsearch
+ .setServerProperty("sonar.search.javaOpts", "-Xms128m -Xmx128m")
+ .setOrchestratorProperty("orchestrator.workspaceDir", "build/it");
+ }
+
public static FileLocation xooPlugin() {
- return FileLocation.byWildcardMavenFilename(new File("../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar");
+ return FileLocation.byWildcardMavenFilename(new File("../plugins/sonar-xoo-plugin/build/libs"), "sonar-xoo-plugin-*.jar");
}
public static List<Issue> getAllServerIssues(Orchestrator orchestrator) {
@@ -164,7 +181,7 @@ public class ItUtils {
* @param dirName the directory of it/plugins, for example "sonar-fake-plugin".
*/
public static FileLocation pluginArtifact(String dirName) {
- return FileLocation.byWildcardMavenFilename(new File("plugins/" + dirName + "/target"), dirName + "-*.jar");
+ return FileLocation.byWildcardMavenFilename(new File("plugins/" + dirName + "/build/libs"), dirName + "-*.jar");
}
/**
diff --git a/third-party-licenses.sh b/third-party-licenses.sh
deleted file mode 100755
index c97a17c4b33..00000000000
--- a/third-party-licenses.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-mvn org.codehaus.mojo:license-maven-plugin:aggregate-add-third-party -Dlicense.includedScopes=compile -pl sonar-application -am
-
-cat target/generated-sources/license/THIRD-PARTY.txt
diff --git a/travis.sh b/travis.sh
index 7c1acf457ea..eaf9879c83c 100755
--- a/travis.sh
+++ b/travis.sh
@@ -23,22 +23,6 @@ function installJdk8 {
export PATH=$JAVA_HOME/bin:$PATH
}
-#
-# Maven 3.2.5 is installed by default on Travis. Maven 3.5 is preferred.
-#
-function installMaven {
- echo "Setup Maven"
- mkdir -p ~/maven
- pushd ~/maven > /dev/null
- if [ ! -d "apache-maven-3.5" ]; then
- echo "Download Maven 3.5"
- curl -sSL https://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz | tar zx -C ~/maven
- fi
- popd > /dev/null
- export M2_HOME=~/maven/apache-maven-3.5.0
- export PATH=$M2_HOME/bin:$PATH
-}
-
function installNode {
set +u
source ~/.nvm/nvm.sh && nvm install 8
@@ -46,61 +30,6 @@ function installNode {
}
#
-# Replaces the version defined in sources, usually x.y-SNAPSHOT,
-# by a version identifying the build.
-# The build version is composed of 4 fields, including the semantic version and
-# the build number provided by Travis.
-#
-# Exported variables:
-# - INITIAL_VERSION: version as defined in pom.xml
-# - BUILD_VERSION: version including the build number
-# - PROJECT_VERSION: target Maven version. The name of this variable is important because
-# it's used by QA when extracting version from Artifactory build info.
-#
-# Example of SNAPSHOT
-# INITIAL_VERSION=6.3-SNAPSHOT
-# BUILD_VERSION=6.3.0.12345
-# PROJECT_VERSION=6.3.0.12345
-#
-# Example of RC
-# INITIAL_VERSION=6.3-RC1
-# BUILD_VERSION=6.3.0.12345
-# PROJECT_VERSION=6.3-RC1
-#
-# Example of GA
-# INITIAL_VERSION=6.3
-# BUILD_VERSION=6.3.0.12345
-# PROJECT_VERSION=6.3
-#
-function fixBuildVersion {
- export INITIAL_VERSION=`maven_expression "project.version"`
-
- # remove suffix -SNAPSHOT or -RC
- without_suffix=`echo $INITIAL_VERSION | sed "s/-.*//g"`
-
- IFS=$'.'
- fields_count=`echo $without_suffix | wc -w`
- unset IFS
- if [ $fields_count -lt 3 ]; then
- export BUILD_VERSION="$without_suffix.0.$TRAVIS_BUILD_NUMBER"
- else
- export BUILD_VERSION="$without_suffix.$TRAVIS_BUILD_NUMBER"
- fi
-
- if [[ "${INITIAL_VERSION}" == *"-SNAPSHOT" ]]; then
- # SNAPSHOT
- export PROJECT_VERSION=$BUILD_VERSION
- mvn org.codehaus.mojo:versions-maven-plugin:2.2:set -DnewVersion=$PROJECT_VERSION -DgenerateBackupPoms=false -B -e
- else
- # not a SNAPSHOT: milestone, RC or GA
- export PROJECT_VERSION=$INITIAL_VERSION
- fi
-
- echo "Build Version : $BUILD_VERSION"
- echo "Project Version: $PROJECT_VERSION"
-}
-
-#
# Configure Maven settings and install some script utilities
#
function configureTravis {
@@ -134,14 +63,10 @@ case "$TARGET" in
BUILD)
installJdk8
- installMaven
installNode
- fixBuildVersion
-
- # Minimal Maven settings
- export MAVEN_OPTS="-Xmx1G -Xms128m"
- MAVEN_ARGS="-T 1C -Dmaven.test.redirectTestOutputToFile=false -Dsurefire.useFile=false -B -e -V -DbuildVersion=$BUILD_VERSION -Dtests.es.logger.level=WARN -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
+ # 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
@@ -153,27 +78,22 @@ BUILD)
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo 'Build and analyze master'
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
- $MAVEN_ARGS \
- -Pdeploy-sonarsource,release
-
- mvn sonar:sonar \
- -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
+ ./gradlew --no-daemon --console plain \
+ -DbuildNumber=$BUILD_NUMBER \
+ build sonarqube artifactoryPublish -PjacocoEnabled=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'
-
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
- $MAVEN_ARGS \
- -Pdeploy-sonarsource,release
-
- mvn sonar:sonar \
+ ./gradlew --no-daemon --console plain \
+ -DbuildNumber=$BUILD_NUMBER \
+ build sonarqube artifactoryPublish -PjacocoEnabled=true -Prelease=true \
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.branch.name=$TRAVIS_BRANCH \
@@ -185,13 +105,9 @@ BUILD)
elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
echo 'Build and analyze internal pull request'
-
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy \
- $MAVEN_ARGS \
- -Dsource.skip=true \
- -Pdeploy-sonarsource,release
-
- mvn sonar:sonar \
+ ./gradlew --no-daemon --console plain \
+ -DbuildNumber=$BUILD_NUMBER \
+ build sonarqube artifactoryPublish -PjacocoEnabled=true -Prelease=true \
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.analysis.buildNumber=$BUILD_NUMBER \
@@ -207,10 +123,10 @@ BUILD)
else
echo 'Build feature branch or external pull request'
- mvn deploy $MAVEN_ARGS -Pdeploy-sonarsource,release
+ ./gradlew --no-daemon --console plain \
+ -DbuildNumber=$BUILD_NUMBER -Prelease=true \
+ build artifactoryPublish
fi
-
- ./run-integration-tests.sh "Lite" ""
;;
WEB_TESTS)