From 1653051ae4b32591b04691cb4c22bcb75d4a404c Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Fri, 22 Jun 2018 16:31:50 +0200 Subject: [PATCH] move some classes from sonar-server to sonar-server-common --- .../server/platform/ServerFileSystem.java | 0 .../server/platform/ServerFileSystemImpl.java | 3 +-- .../sonar/server/platform/package-info.java | 23 +++++++++++++++++++ .../org/sonar/server/user/UserSession.java | 0 .../org/sonar/server/user/package-info.java | 23 +++++++++++++++++++ .../AbstractStoppableExecutorService.java | 0 ...StoppableScheduledExecutorServiceImpl.java | 0 .../server/util/StoppableExecutorService.java | 0 .../StoppableScheduledExecutorService.java | 0 .../org/sonar/server/util/package-info.java | 23 +++++++++++++++++++ .../AbstractStoppableExecutorServiceTest.java | 0 11 files changed, 70 insertions(+), 2 deletions(-) rename server/{sonar-server => sonar-server-common}/src/main/java/org/sonar/server/platform/ServerFileSystem.java (100%) rename server/{sonar-server => sonar-server-common}/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java (95%) create mode 100644 server/sonar-server-common/src/main/java/org/sonar/server/platform/package-info.java rename server/{sonar-server => sonar-server-common}/src/main/java/org/sonar/server/user/UserSession.java (100%) create mode 100644 server/sonar-server-common/src/main/java/org/sonar/server/user/package-info.java rename server/{sonar-server => sonar-server-common}/src/main/java/org/sonar/server/util/AbstractStoppableExecutorService.java (100%) rename server/{sonar-server => sonar-server-common}/src/main/java/org/sonar/server/util/AbstractStoppableScheduledExecutorServiceImpl.java (100%) rename server/{sonar-server => sonar-server-common}/src/main/java/org/sonar/server/util/StoppableExecutorService.java (100%) rename server/{sonar-server => sonar-server-common}/src/main/java/org/sonar/server/util/StoppableScheduledExecutorService.java (100%) create mode 100644 server/sonar-server-common/src/main/java/org/sonar/server/util/package-info.java rename server/{sonar-server => sonar-server-common}/src/test/java/org/sonar/server/util/AbstractStoppableExecutorServiceTest.java (100%) diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystem.java b/server/sonar-server-common/src/main/java/org/sonar/server/platform/ServerFileSystem.java similarity index 100% rename from server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystem.java rename to server/sonar-server-common/src/main/java/org/sonar/server/platform/ServerFileSystem.java diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java b/server/sonar-server-common/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java similarity index 95% rename from server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java rename to server/sonar-server-common/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java index 34fe69c7e87..9818d98584f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/platform/ServerFileSystemImpl.java @@ -24,7 +24,6 @@ import org.picocontainer.Startable; import org.sonar.api.config.Configuration; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; -import org.sonar.server.app.TomcatContexts; import static org.sonar.process.ProcessProperties.Property.PATH_DATA; import static org.sonar.process.ProcessProperties.Property.PATH_HOME; @@ -43,7 +42,7 @@ public class ServerFileSystemImpl implements ServerFileSystem, org.sonar.api.pla this.homeDir = new File(config.get(PATH_HOME.getKey()).get()); this.tempDir = new File(config.get(PATH_TEMP.getKey()).get()); File dataDir = new File(config.get(PATH_DATA.getKey()).get()); - this.deployDir = new File(dataDir, TomcatContexts.WEB_DEPLOY_PATH_RELATIVE_TO_DATA_DIR); + this.deployDir = new File(dataDir, "web/deploy"); this.uninstallDir = new File(getTempDir(), "uninstalled-plugins"); } diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/platform/package-info.java b/server/sonar-server-common/src/main/java/org/sonar/server/platform/package-info.java new file mode 100644 index 00000000000..1b2de9bebab --- /dev/null +++ b/server/sonar-server-common/src/main/java/org/sonar/server/platform/package-info.java @@ -0,0 +1,23 @@ +/* + * 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. + */ +@ParametersAreNonnullByDefault +package org.sonar.server.platform; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/sonar-server/src/main/java/org/sonar/server/user/UserSession.java b/server/sonar-server-common/src/main/java/org/sonar/server/user/UserSession.java similarity index 100% rename from server/sonar-server/src/main/java/org/sonar/server/user/UserSession.java rename to server/sonar-server-common/src/main/java/org/sonar/server/user/UserSession.java diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/user/package-info.java b/server/sonar-server-common/src/main/java/org/sonar/server/user/package-info.java new file mode 100644 index 00000000000..63c7ca1e1fb --- /dev/null +++ b/server/sonar-server-common/src/main/java/org/sonar/server/user/package-info.java @@ -0,0 +1,23 @@ +/* + * 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. + */ +@ParametersAreNonnullByDefault +package org.sonar.server.user; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/sonar-server/src/main/java/org/sonar/server/util/AbstractStoppableExecutorService.java b/server/sonar-server-common/src/main/java/org/sonar/server/util/AbstractStoppableExecutorService.java similarity index 100% rename from server/sonar-server/src/main/java/org/sonar/server/util/AbstractStoppableExecutorService.java rename to server/sonar-server-common/src/main/java/org/sonar/server/util/AbstractStoppableExecutorService.java diff --git a/server/sonar-server/src/main/java/org/sonar/server/util/AbstractStoppableScheduledExecutorServiceImpl.java b/server/sonar-server-common/src/main/java/org/sonar/server/util/AbstractStoppableScheduledExecutorServiceImpl.java similarity index 100% rename from server/sonar-server/src/main/java/org/sonar/server/util/AbstractStoppableScheduledExecutorServiceImpl.java rename to server/sonar-server-common/src/main/java/org/sonar/server/util/AbstractStoppableScheduledExecutorServiceImpl.java diff --git a/server/sonar-server/src/main/java/org/sonar/server/util/StoppableExecutorService.java b/server/sonar-server-common/src/main/java/org/sonar/server/util/StoppableExecutorService.java similarity index 100% rename from server/sonar-server/src/main/java/org/sonar/server/util/StoppableExecutorService.java rename to server/sonar-server-common/src/main/java/org/sonar/server/util/StoppableExecutorService.java diff --git a/server/sonar-server/src/main/java/org/sonar/server/util/StoppableScheduledExecutorService.java b/server/sonar-server-common/src/main/java/org/sonar/server/util/StoppableScheduledExecutorService.java similarity index 100% rename from server/sonar-server/src/main/java/org/sonar/server/util/StoppableScheduledExecutorService.java rename to server/sonar-server-common/src/main/java/org/sonar/server/util/StoppableScheduledExecutorService.java diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/util/package-info.java b/server/sonar-server-common/src/main/java/org/sonar/server/util/package-info.java new file mode 100644 index 00000000000..43e6865562f --- /dev/null +++ b/server/sonar-server-common/src/main/java/org/sonar/server/util/package-info.java @@ -0,0 +1,23 @@ +/* + * 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. + */ +@ParametersAreNonnullByDefault +package org.sonar.server.util; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/sonar-server/src/test/java/org/sonar/server/util/AbstractStoppableExecutorServiceTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/util/AbstractStoppableExecutorServiceTest.java similarity index 100% rename from server/sonar-server/src/test/java/org/sonar/server/util/AbstractStoppableExecutorServiceTest.java rename to server/sonar-server-common/src/test/java/org/sonar/server/util/AbstractStoppableExecutorServiceTest.java -- 2.39.5