aboutsummaryrefslogtreecommitdiffstats
path: root/server
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 /server
parent21fbe3697bdb6e66016ef8d0bea49da574e02e7d (diff)
downloadsonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.tar.gz
sonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.zip
Move To Gradle
Diffstat (limited to 'server')
-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
32 files changed, 549 insertions, 1471 deletions
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>