diff options
-rw-r--r-- | server/sonar-ce-common/build.gradle | 55 | ||||
-rw-r--r-- | server/sonar-ce-common/src/main/java/org/sonar/ce/configuration/WorkerCountProvider.java (renamed from server/sonar-server/src/main/java/org/sonar/ce/configuration/WorkerCountProvider.java) | 0 | ||||
-rw-r--r-- | server/sonar-ce-common/src/main/java/org/sonar/ce/configuration/package-info.java (renamed from server/sonar-server/src/main/java/org/sonar/ce/configuration/package-info.java) | 0 | ||||
-rw-r--r-- | server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueue.java (renamed from server/sonar-server/src/main/java/org/sonar/ce/queue/CeQueue.java) | 0 | ||||
-rw-r--r-- | server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java (renamed from server/sonar-server/src/main/java/org/sonar/ce/queue/CeQueueImpl.java) | 0 | ||||
-rw-r--r-- | server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeTaskSubmit.java (renamed from server/sonar-server/src/main/java/org/sonar/ce/queue/CeTaskSubmit.java) | 0 | ||||
-rw-r--r-- | server/sonar-ce-common/src/main/java/org/sonar/ce/queue/package-info.java (renamed from server/sonar-server/src/main/java/org/sonar/ce/queue/package-info.java) | 0 | ||||
-rw-r--r-- | server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java (renamed from server/sonar-server/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java) | 0 | ||||
-rw-r--r-- | server/sonar-ce-task-projectanalysis/build.gradle | 1 | ||||
-rw-r--r-- | server/sonar-ce/build.gradle | 1 | ||||
-rw-r--r-- | server/sonar-server-common/build.gradle | 47 | ||||
-rw-r--r-- | server/sonar-server-common/src/test/java/org/sonar/server/organization/TestDefaultOrganizationProvider.java (renamed from server/sonar-server/src/test/java/org/sonar/server/organization/TestDefaultOrganizationProvider.java) | 0 | ||||
-rw-r--r-- | server/sonar-server/build.gradle | 2 | ||||
-rw-r--r-- | settings.gradle | 1 |
14 files changed, 93 insertions, 14 deletions
diff --git a/server/sonar-ce-common/build.gradle b/server/sonar-ce-common/build.gradle new file mode 100644 index 00000000000..c028c302b2f --- /dev/null +++ b/server/sonar-ce-common/build.gradle @@ -0,0 +1,55 @@ +description = 'Code relating to the Compute Engine shared between the Compute Engine and the Web Server' + +sonarqube { + properties { + property 'sonar.projectName', "${projectTitle} :: Compute Engine :: Common" + } +} + +sourceSets { + test { + resources { + srcDirs += ['src/test/projects'] + } + } +} + + +import org.apache.tools.ant.filters.ReplaceTokens +processResources { + filesMatching('build.properties') { + filter ReplaceTokens, tokens: [ + 'buildNumber': release ? 'git rev-parse HEAD'.execute().text.trim() : 'N/A' + ] + } +} + +configurations { + testCompile.extendsFrom compileOnly +} + +dependencies { + // please keep the list grouped by configuration and ordered by name + + compile 'org.slf4j:jul-to-slf4j' + compile 'org.slf4j:slf4j-api' + compile project(':server:sonar-db-dao') + + compileOnly 'com.google.code.findbugs:jsr305' + compileOnly project(':server:sonar-ce-task') + compileOnly project(':server:sonar-server-common') + + testCompile 'com.google.code.findbugs:jsr305' + testCompile 'com.h2database:h2' + 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.mockito:mockito-core' + testCompile project(':sonar-plugin-api') + testCompile project(':sonar-core') + testCompile project(':server:sonar-db-testing') + testCompile project(path: ":server:sonar-server-common", configuration: "tests") +} diff --git a/server/sonar-server/src/main/java/org/sonar/ce/configuration/WorkerCountProvider.java b/server/sonar-ce-common/src/main/java/org/sonar/ce/configuration/WorkerCountProvider.java index 0b2362785dd..0b2362785dd 100644 --- a/server/sonar-server/src/main/java/org/sonar/ce/configuration/WorkerCountProvider.java +++ b/server/sonar-ce-common/src/main/java/org/sonar/ce/configuration/WorkerCountProvider.java diff --git a/server/sonar-server/src/main/java/org/sonar/ce/configuration/package-info.java b/server/sonar-ce-common/src/main/java/org/sonar/ce/configuration/package-info.java index 95986bdb22b..95986bdb22b 100644 --- a/server/sonar-server/src/main/java/org/sonar/ce/configuration/package-info.java +++ b/server/sonar-ce-common/src/main/java/org/sonar/ce/configuration/package-info.java diff --git a/server/sonar-server/src/main/java/org/sonar/ce/queue/CeQueue.java b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueue.java index cb6810f5a86..cb6810f5a86 100644 --- a/server/sonar-server/src/main/java/org/sonar/ce/queue/CeQueue.java +++ b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueue.java diff --git a/server/sonar-server/src/main/java/org/sonar/ce/queue/CeQueueImpl.java b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java index 01b113bd64d..01b113bd64d 100644 --- a/server/sonar-server/src/main/java/org/sonar/ce/queue/CeQueueImpl.java +++ b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java diff --git a/server/sonar-server/src/main/java/org/sonar/ce/queue/CeTaskSubmit.java b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeTaskSubmit.java index c3eb9083d2d..c3eb9083d2d 100644 --- a/server/sonar-server/src/main/java/org/sonar/ce/queue/CeTaskSubmit.java +++ b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeTaskSubmit.java diff --git a/server/sonar-server/src/main/java/org/sonar/ce/queue/package-info.java b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/package-info.java index 600d3bce96e..600d3bce96e 100644 --- a/server/sonar-server/src/main/java/org/sonar/ce/queue/package-info.java +++ b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/package-info.java diff --git a/server/sonar-server/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java b/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java index 8d0c5db35b2..8d0c5db35b2 100644 --- a/server/sonar-server/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java +++ b/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java diff --git a/server/sonar-ce-task-projectanalysis/build.gradle b/server/sonar-ce-task-projectanalysis/build.gradle index 90ca771974e..b650cfe4c12 100644 --- a/server/sonar-ce-task-projectanalysis/build.gradle +++ b/server/sonar-ce-task-projectanalysis/build.gradle @@ -57,6 +57,7 @@ dependencies { testCompile project(':server:sonar-db-testing') testCompile project(path: ":server:sonar-ce-task", configuration: "tests") testCompile project(path: ":server:sonar-server", configuration: "tests") + testCompile project(path: ":server:sonar-server-common", configuration: "tests") } task testJar(type: Jar) { diff --git a/server/sonar-ce/build.gradle b/server/sonar-ce/build.gradle index a98c2448250..43da9d72769 100644 --- a/server/sonar-ce/build.gradle +++ b/server/sonar-ce/build.gradle @@ -11,6 +11,7 @@ dependencies { compile 'com.google.protobuf:protobuf-java' compile 'org.nanohttpd:nanohttpd' + compile project(':server:sonar-ce-common') compile project(':server:sonar-ce-task') compile project(':server:sonar-ce-task-projectanalysis') compile project(':server:sonar-server') diff --git a/server/sonar-server-common/build.gradle b/server/sonar-server-common/build.gradle index 94fa4862ee7..6e189c3febf 100644 --- a/server/sonar-server-common/build.gradle +++ b/server/sonar-server-common/build.gradle @@ -1,23 +1,42 @@ +description = 'Code shared between the Web Server and the Compute Engine' + sonarqube { - properties { - property 'sonar.projectName', "${projectTitle} :: Server :: Common" - } + properties { + property 'sonar.projectName', "${projectTitle} :: Server :: Common" + } +} + +configurations { + tests } dependencies { - // please keep the list grouped by configuration and ordered by name + // please keep the list grouped by configuration and ordered by name + + compile 'com.google.guava:guava' + compile 'org.slf4j:slf4j-api' + compile project(':sonar-core') + compile project(':server:sonar-db-dao') - compile 'com.google.guava:guava' - compile 'org.slf4j:slf4j-api' + compileOnly project(path: ':sonar-plugin-api') + compileOnly project(path: ':server:sonar-process') - compile project(':sonar-core') - compileOnly project(path: ':sonar-plugin-api') + compileOnly 'com.google.code.findbugs:jsr305' - 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.mockito:mockito-core' + testCompile project(':server:sonar-db-testing') +} + +task testJar(type: Jar) { + classifier = 'tests' + from sourceSets.test.output +} - 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' +artifacts { + tests testJar } diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/TestDefaultOrganizationProvider.java b/server/sonar-server-common/src/test/java/org/sonar/server/organization/TestDefaultOrganizationProvider.java index 10092482447..10092482447 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/organization/TestDefaultOrganizationProvider.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/organization/TestDefaultOrganizationProvider.java diff --git a/server/sonar-server/build.gradle b/server/sonar-server/build.gradle index ee6ae5f52b2..21109c42864 100644 --- a/server/sonar-server/build.gradle +++ b/server/sonar-server/build.gradle @@ -47,6 +47,7 @@ dependencies { compile 'org.sonarsource.update-center:sonar-update-center-common' compile 'org.mindrot:jbcrypt' + compile project(':server:sonar-ce-common') compile project(':server:sonar-ce-task') compile project(':server:sonar-db-dao') compile project(':server:sonar-db-migration') @@ -83,6 +84,7 @@ dependencies { testCompile 'org.mockito:mockito-core' testCompile 'org.subethamail:subethasmtp' testCompile project(':server:sonar-db-testing') + testCompile project(path: ":server:sonar-server-common", configuration: "tests") } task testJar(type: Jar) { diff --git a/settings.gradle b/settings.gradle index 7ca50832a31..6b469663924 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,7 @@ include 'plugins:sonar-xoo-plugin' include 'server:sonar-bitbucketcloud' include 'server:sonar-ce' +include 'server:sonar-ce-common' include 'server:sonar-ce-task' include 'server:sonar-ce-task-projectanalysis' include 'server:sonar-db-testing' |