aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-14 16:33:26 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-26 23:49:37 +0200
commit87ce833df2754dc1a23d29e56571ba826978b7bd (patch)
tree31c73987010443b47bdff75f5aeed1d05370d094
parente3f8991bf2bb425f2829a4767a2d5fe6e3236c8c (diff)
downloadsonarqube-87ce833df2754dc1a23d29e56571ba826978b7bd.tar.gz
sonarqube-87ce833df2754dc1a23d29e56571ba826978b7bd.zip
SONAR-9803 restrict sonar-process to classes shared by all processes only
-rw-r--r--server/sonar-main/pom.xml11
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java6
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/AbstractCommand.java (renamed from server/sonar-process/src/main/java/org/sonar/process/command/AbstractCommand.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java (renamed from server/sonar-process/src/main/java/org/sonar/process/jmvoptions/CeJvmOptions.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/CommandFactory.java (renamed from server/sonar-process/src/main/java/org/sonar/process/command/CommandFactory.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java (renamed from server/sonar-process/src/main/java/org/sonar/process/command/CommandFactoryImpl.java)14
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/EsCommand.java (renamed from server/sonar-process/src/main/java/org/sonar/process/command/EsCommand.java)7
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java (renamed from server/sonar-process/src/main/java/org/sonar/process/jmvoptions/EsJvmOptions.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/JavaCommand.java (renamed from server/sonar-process/src/main/java/org/sonar/process/command/JavaCommand.java)3
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/JvmOptions.java (renamed from server/sonar-process/src/main/java/org/sonar/process/jmvoptions/JvmOptions.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java (renamed from server/sonar-process/src/main/java/org/sonar/process/jmvoptions/WebJvmOptions.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/package-info.java (renamed from server/sonar-process/src/main/java/org/sonar/process/command/package-info.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/es/EsFileSystem.java (renamed from server/sonar-process/src/main/java/org/sonar/process/es/EsFileSystem.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java (renamed from server/sonar-process/src/main/java/org/sonar/process/es/EsLogging.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java (renamed from server/sonar-process/src/main/java/org/sonar/process/es/EsSettings.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java (renamed from server/sonar-process/src/main/java/org/sonar/process/es/EsYmlSettings.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/es/package-info.java (renamed from server/sonar-process/src/main/java/org/sonar/process/es/package-info.java)2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/process/EsProcessMonitor.java2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncher.java4
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncherImpl.java10
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/SchedulerImplTest.java8
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/AbstractCommandTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/command/AbstractCommandTest.java)2
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/CeJvmOptionsTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/jmvoptions/CeJvmOptionsTest.java)2
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/command/CommandFactoryImplTest.java)4
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/EsJvmOptionsTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/jmvoptions/EsJvmOptionsTest.java)6
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/JavaCommandTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/command/JavaCommandTest.java)3
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/JvmOptionsTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/jmvoptions/JvmOptionsTest.java)2
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/command/WebJvmOptionsTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/jmvoptions/WebJvmOptionsTest.java)2
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/es/EsFileSystemTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/es/EsFileSystemTest.java)2
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/es/EsLoggingTest.java)3
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/es/EsSettingsTest.java)4
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/es/EsYmlSettingsTest.java (renamed from server/sonar-process/src/test/java/org/sonar/process/es/EsYmlSettingsTest.java)2
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/logging/ListAppender.java (renamed from server/sonar-process/src/test/java/org/sonar/process/logging/ListAppender.java)3
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/process/EsProcessMonitorTest.java2
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/process/ProcessLauncherImplTest.java4
-rw-r--r--server/sonar-process/src/main/java/org/sonar/process/jmvoptions/package-info.java23
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java4
37 files changed, 69 insertions, 88 deletions
diff --git a/server/sonar-main/pom.xml b/server/sonar-main/pom.xml
index 9aa79852803..707e0fb6016 100644
--- a/server/sonar-main/pom.xml
+++ b/server/sonar-main/pom.xml
@@ -90,6 +90,17 @@
<artifactId>hazelcast-client</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>
diff --git a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java
index 3268bb249c6..0f9214e20b1 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java
@@ -43,9 +43,9 @@ import org.sonar.application.process.ProcessLifecycleListener;
import org.sonar.application.process.ProcessMonitor;
import org.sonar.application.process.SQProcess;
import org.sonar.process.ProcessId;
-import org.sonar.process.command.CommandFactory;
-import org.sonar.process.command.EsCommand;
-import org.sonar.process.command.JavaCommand;
+import org.sonar.application.command.CommandFactory;
+import org.sonar.application.command.EsCommand;
+import org.sonar.application.command.JavaCommand;
public class SchedulerImpl implements Scheduler, ProcessEventListener, ProcessLifecycleListener, AppStateListener {
diff --git a/server/sonar-process/src/main/java/org/sonar/process/command/AbstractCommand.java b/server/sonar-main/src/main/java/org/sonar/application/command/AbstractCommand.java
index d968b8adc74..2da97bb8f8f 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/command/AbstractCommand.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/AbstractCommand.java
@@ -17,7 +17,7 @@
* 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.process.command;
+package org.sonar.application.command;
import java.io.File;
import java.util.HashMap;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/CeJvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java
index b9b4ff0b2cc..57e4b1b090e 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/CeJvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import java.io.File;
import java.util.LinkedHashMap;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/command/CommandFactory.java b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactory.java
index f30537e487a..e55f364be11 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/command/CommandFactory.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactory.java
@@ -17,7 +17,7 @@
* 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.process.command;
+package org.sonar.application.command;
public interface CommandFactory {
diff --git a/server/sonar-process/src/main/java/org/sonar/process/command/CommandFactoryImpl.java b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java
index b6d8dedaa40..0df586aa7f0 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/command/CommandFactoryImpl.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java
@@ -17,7 +17,7 @@
* 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.process.command;
+package org.sonar.application.command;
import java.io.File;
import java.util.Map;
@@ -27,14 +27,10 @@ import org.sonar.process.ProcessId;
import org.sonar.process.ProcessProperties;
import org.sonar.process.Props;
import org.sonar.process.System2;
-import org.sonar.process.es.EsFileSystem;
-import org.sonar.process.es.EsLogging;
-import org.sonar.process.es.EsSettings;
-import org.sonar.process.es.EsYmlSettings;
-import org.sonar.process.jmvoptions.CeJvmOptions;
-import org.sonar.process.jmvoptions.EsJvmOptions;
-import org.sonar.process.jmvoptions.JvmOptions;
-import org.sonar.process.jmvoptions.WebJvmOptions;
+import org.sonar.application.es.EsFileSystem;
+import org.sonar.application.es.EsLogging;
+import org.sonar.application.es.EsSettings;
+import org.sonar.application.es.EsYmlSettings;
import static org.sonar.process.ProcessProperties.HTTPS_PROXY_HOST;
import static org.sonar.process.ProcessProperties.HTTPS_PROXY_PORT;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/command/EsCommand.java b/server/sonar-main/src/main/java/org/sonar/application/command/EsCommand.java
index a6d59ac7195..d44e272132f 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/command/EsCommand.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/EsCommand.java
@@ -17,17 +17,16 @@
* 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.process.command;
+package org.sonar.application.command;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
+import org.sonar.application.es.EsFileSystem;
+import org.sonar.application.es.EsYmlSettings;
import org.sonar.process.ProcessId;
import org.sonar.process.System2;
-import org.sonar.process.es.EsFileSystem;
-import org.sonar.process.es.EsYmlSettings;
-import org.sonar.process.jmvoptions.EsJvmOptions;
public class EsCommand extends AbstractCommand<EsCommand> {
private EsFileSystem fileSystem;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/EsJvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
index eddf98b4ef0..bf2dfd680b3 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/EsJvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import java.io.File;
import java.io.IOException;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/command/JavaCommand.java b/server/sonar-main/src/main/java/org/sonar/application/command/JavaCommand.java
index fd461b2b5f6..5cee5a95e33 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/command/JavaCommand.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/JavaCommand.java
@@ -17,14 +17,13 @@
* 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.process.command;
+package org.sonar.application.command;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.sonar.process.ProcessId;
import org.sonar.process.System2;
-import org.sonar.process.jmvoptions.JvmOptions;
public class JavaCommand<T extends JvmOptions> extends AbstractCommand<JavaCommand<T>> {
// entry point
diff --git a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/JvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/JvmOptions.java
index 13560f9c50f..3ef1b3bfd20 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/JvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/JvmOptions.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/WebJvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java
index a2a3f8f2d04..9a066a736f8 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/WebJvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import java.io.File;
import java.util.LinkedHashMap;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/command/package-info.java b/server/sonar-main/src/main/java/org/sonar/application/command/package-info.java
index 248864dafe3..a083f0ab81a 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/command/package-info.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/package-info.java
@@ -18,6 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.process.command;
+package org.sonar.application.command;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/es/EsFileSystem.java b/server/sonar-main/src/main/java/org/sonar/application/es/EsFileSystem.java
index 033791c8049..73fc79edbe4 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/es/EsFileSystem.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/es/EsFileSystem.java
@@ -17,7 +17,7 @@
* 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.process.es;
+package org.sonar.application.es;
import java.io.File;
import org.apache.commons.lang.StringUtils;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/es/EsLogging.java b/server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java
index b5a6727f45b..90fb1d74c2c 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/es/EsLogging.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/es/EsLogging.java
@@ -17,7 +17,7 @@
* 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.process.es;
+package org.sonar.application.es;
import ch.qos.logback.classic.Level;
import java.io.File;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/es/EsSettings.java b/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java
index 42eac51eea0..eb69acdbd61 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/es/EsSettings.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java
@@ -17,7 +17,7 @@
* 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.process.es;
+package org.sonar.application.es;
import java.net.InetAddress;
import java.net.UnknownHostException;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/es/EsYmlSettings.java b/server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java
index 6eae2b14524..3ba92d55cbc 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/es/EsYmlSettings.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java
@@ -17,7 +17,7 @@
* 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.process.es;
+package org.sonar.application.es;
import java.io.File;
import java.io.IOException;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/es/package-info.java b/server/sonar-main/src/main/java/org/sonar/application/es/package-info.java
index 35e9b4aee97..8f296059727 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/es/package-info.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/es/package-info.java
@@ -18,6 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.process.es;
+package org.sonar.application.es;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/server/sonar-main/src/main/java/org/sonar/application/process/EsProcessMonitor.java b/server/sonar-main/src/main/java/org/sonar/application/process/EsProcessMonitor.java
index e4730c7303d..fd611188f95 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/process/EsProcessMonitor.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/process/EsProcessMonitor.java
@@ -38,7 +38,7 @@ import org.elasticsearch.discovery.MasterNotDiscoveredException;
import org.elasticsearch.transport.Netty4Plugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.sonar.process.command.EsCommand;
+import org.sonar.application.command.EsCommand;
import static java.util.Collections.singletonList;
import static java.util.Collections.unmodifiableList;
diff --git a/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncher.java b/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncher.java
index c39f91bc8fa..c0ca8ec7825 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncher.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncher.java
@@ -20,8 +20,8 @@
package org.sonar.application.process;
import java.io.Closeable;
-import org.sonar.process.command.EsCommand;
-import org.sonar.process.command.JavaCommand;
+import org.sonar.application.command.EsCommand;
+import org.sonar.application.command.JavaCommand;
public interface ProcessLauncher extends Closeable {
diff --git a/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncherImpl.java b/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncherImpl.java
index b0b968f05eb..1a8daf01ae3 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncherImpl.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/process/ProcessLauncherImpl.java
@@ -31,12 +31,12 @@ import java.util.Properties;
import java.util.function.Supplier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.sonar.application.command.AbstractCommand;
+import org.sonar.application.command.EsCommand;
+import org.sonar.application.command.JavaCommand;
+import org.sonar.application.command.JvmOptions;
+import org.sonar.application.es.EsFileSystem;
import org.sonar.process.ProcessId;
-import org.sonar.process.command.AbstractCommand;
-import org.sonar.process.command.EsCommand;
-import org.sonar.process.command.JavaCommand;
-import org.sonar.process.es.EsFileSystem;
-import org.sonar.process.jmvoptions.JvmOptions;
import org.sonar.process.sharedmemoryfile.AllProcessesCommands;
import org.sonar.process.sharedmemoryfile.ProcessCommands;
diff --git a/server/sonar-main/src/test/java/org/sonar/application/SchedulerImplTest.java b/server/sonar-main/src/test/java/org/sonar/application/SchedulerImplTest.java
index f419f4d0e17..a2ada4bb3f8 100644
--- a/server/sonar-main/src/test/java/org/sonar/application/SchedulerImplTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/SchedulerImplTest.java
@@ -43,10 +43,10 @@ import org.sonar.application.process.ProcessLauncher;
import org.sonar.application.process.ProcessMonitor;
import org.sonar.cluster.localclient.HazelcastClient;
import org.sonar.process.ProcessId;
-import org.sonar.process.command.AbstractCommand;
-import org.sonar.process.command.CommandFactory;
-import org.sonar.process.command.EsCommand;
-import org.sonar.process.command.JavaCommand;
+import org.sonar.application.command.AbstractCommand;
+import org.sonar.application.command.CommandFactory;
+import org.sonar.application.command.EsCommand;
+import org.sonar.application.command.JavaCommand;
import static java.util.Collections.synchronizedList;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/command/AbstractCommandTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/AbstractCommandTest.java
index dec2dde6008..c5ff76bc4dc 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/command/AbstractCommandTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/AbstractCommandTest.java
@@ -17,7 +17,7 @@
* 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.process.command;
+package org.sonar.application.command;
import java.io.File;
import java.io.IOException;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/CeJvmOptionsTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/CeJvmOptionsTest.java
index 3bd8bf37d91..4084336249c 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/CeJvmOptionsTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/CeJvmOptionsTest.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import java.io.File;
import java.io.IOException;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/command/CommandFactoryImplTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java
index c6b2abc4e09..ceb13a08dac 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/command/CommandFactoryImplTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java
@@ -17,7 +17,7 @@
* 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.process.command;
+package org.sonar.application.command;
import ch.qos.logback.classic.spi.ILoggingEvent;
import java.io.File;
@@ -35,7 +35,7 @@ import org.sonar.process.ProcessId;
import org.sonar.process.ProcessProperties;
import org.sonar.process.Props;
import org.sonar.process.System2;
-import org.sonar.process.logging.ListAppender;
+import org.sonar.application.logging.ListAppender;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/EsJvmOptionsTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/EsJvmOptionsTest.java
index dd47b1100a6..9f4aa5efee3 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/EsJvmOptionsTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/EsJvmOptionsTest.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import java.io.File;
import java.io.IOException;
@@ -25,9 +25,9 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
+import org.sonar.test.ExceptionCauseMatcher;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonar.test.ExceptionCauseMatcher.hasType;
public class EsJvmOptionsTest {
@Rule
@@ -101,7 +101,7 @@ public class EsJvmOptionsTest {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("Cannot write Elasticsearch jvm options file");
- expectedException.expectCause(hasType(IOException.class));
+ expectedException.expectCause(ExceptionCauseMatcher.hasType(IOException.class));
underTest.writeToJvmOptionFile(notAFile);
}
diff --git a/server/sonar-process/src/test/java/org/sonar/process/command/JavaCommandTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/JavaCommandTest.java
index dd0f71a677c..bd39967ccc9 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/command/JavaCommandTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/JavaCommandTest.java
@@ -17,7 +17,7 @@
* 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.process.command;
+package org.sonar.application.command;
import java.io.File;
import java.util.Properties;
@@ -25,7 +25,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.process.ProcessId;
-import org.sonar.process.jmvoptions.JvmOptions;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/JvmOptionsTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/JvmOptionsTest.java
index 35de8ef0b8c..038506939a8 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/JvmOptionsTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/JvmOptionsTest.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import com.google.common.collect.ImmutableMap;
import com.tngtech.java.junit.dataprovider.DataProvider;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/WebJvmOptionsTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/WebJvmOptionsTest.java
index 9387a15b808..dfd8f154e6a 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/jmvoptions/WebJvmOptionsTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/command/WebJvmOptionsTest.java
@@ -17,7 +17,7 @@
* 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.process.jmvoptions;
+package org.sonar.application.command;
import java.io.File;
import java.io.IOException;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/es/EsFileSystemTest.java b/server/sonar-main/src/test/java/org/sonar/application/es/EsFileSystemTest.java
index d3d10693656..e015b6bcce3 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/es/EsFileSystemTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/es/EsFileSystemTest.java
@@ -17,7 +17,7 @@
* 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.process.es;
+package org.sonar.application.es;
import java.io.File;
import java.io.IOException;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/es/EsLoggingTest.java b/server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java
index 4f511ef2260..7dc29ec2f55 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/es/EsLoggingTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/es/EsLoggingTest.java
@@ -17,7 +17,7 @@
* 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.process.es;
+package org.sonar.application.es;
import java.io.File;
import java.io.IOException;
@@ -28,7 +28,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.process.Props;
-import org.sonar.process.es.EsLogging;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/es/EsSettingsTest.java b/server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java
index d8bc647ae7c..1a09f0ac240 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/es/EsSettingsTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java
@@ -17,7 +17,7 @@
* 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.process.es;
+package org.sonar.application.es;
import ch.qos.logback.classic.spi.ILoggingEvent;
import java.io.File;
@@ -30,11 +30,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
+import org.sonar.application.logging.ListAppender;
import org.sonar.cluster.ClusterProperties;
import org.sonar.process.ProcessProperties;
import org.sonar.process.Props;
import org.sonar.process.System2;
-import org.sonar.process.logging.ListAppender;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-process/src/test/java/org/sonar/process/es/EsYmlSettingsTest.java b/server/sonar-main/src/test/java/org/sonar/application/es/EsYmlSettingsTest.java
index 0fd6dc82544..6920c7f2710 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/es/EsYmlSettingsTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/es/EsYmlSettingsTest.java
@@ -1,4 +1,4 @@
-package org.sonar.process.es;/*
+package org.sonar.application.es;/*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
diff --git a/server/sonar-process/src/test/java/org/sonar/process/logging/ListAppender.java b/server/sonar-main/src/test/java/org/sonar/application/logging/ListAppender.java
index fec800706c2..7a8ca8bd56a 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/logging/ListAppender.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/logging/ListAppender.java
@@ -17,12 +17,13 @@
* 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.process.logging;
+package org.sonar.application.logging;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.AppenderBase;
import java.util.ArrayList;
import java.util.List;
+import org.sonar.process.logging.LogbackHelper;
public final class ListAppender extends AppenderBase<ILoggingEvent> {
private final List<ILoggingEvent> logs = new ArrayList<>();
diff --git a/server/sonar-main/src/test/java/org/sonar/application/process/EsProcessMonitorTest.java b/server/sonar-main/src/test/java/org/sonar/application/process/EsProcessMonitorTest.java
index d0ef83444fc..7af20a08cc1 100644
--- a/server/sonar-main/src/test/java/org/sonar/application/process/EsProcessMonitorTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/process/EsProcessMonitorTest.java
@@ -35,7 +35,7 @@ import org.elasticsearch.discovery.MasterNotDiscoveredException;
import org.junit.Test;
import org.slf4j.LoggerFactory;
import org.sonar.process.ProcessId;
-import org.sonar.process.command.EsCommand;
+import org.sonar.application.command.EsCommand;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
diff --git a/server/sonar-main/src/test/java/org/sonar/application/process/ProcessLauncherImplTest.java b/server/sonar-main/src/test/java/org/sonar/application/process/ProcessLauncherImplTest.java
index a0a4bba391d..36a288c1f02 100644
--- a/server/sonar-main/src/test/java/org/sonar/application/process/ProcessLauncherImplTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/process/ProcessLauncherImplTest.java
@@ -31,8 +31,8 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.process.ProcessId;
-import org.sonar.process.command.JavaCommand;
-import org.sonar.process.jmvoptions.JvmOptions;
+import org.sonar.application.command.JavaCommand;
+import org.sonar.application.command.JvmOptions;
import org.sonar.process.sharedmemoryfile.AllProcessesCommands;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/package-info.java b/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/package-info.java
deleted file mode 100644
index f88e33e481a..00000000000
--- a/server/sonar-process/src/main/java/org/sonar/process/jmvoptions/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 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.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.process.jmvoptions;
-
-import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index 54d233f5947..1060726970a 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -29,8 +29,8 @@ import org.sonar.application.process.StopRequestWatcher;
import org.sonar.application.process.StopRequestWatcherImpl;
import org.sonar.process.System2;
import org.sonar.process.SystemExit;
-import org.sonar.process.command.CommandFactory;
-import org.sonar.process.command.CommandFactoryImpl;
+import org.sonar.application.command.CommandFactory;
+import org.sonar.application.command.CommandFactoryImpl;
import static org.sonar.application.config.SonarQubeVersionHelper.getSonarqubeVersion;
import static org.sonar.cluster.ClusterProperties.CLUSTER_NAME;