From b32cbc1baa4dbf859cbde91bc7ce5c42929ffadb Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 7 Jun 2018 16:35:34 -0400 Subject: [PATCH] Move cli sub-project out of server to libs (#31184) This commit moves the cli sub-project out of server to libs where it makes more sense. --- build.gradle | 2 +- {server => libs}/cli/build.gradle | 0 .../cli/licenses/jopt-simple-5.0.2.jar.sha1 | 0 {server => libs}/cli/licenses/jopt-simple-LICENSE.txt | 0 {server => libs}/cli/licenses/jopt-simple-NOTICE.txt | 0 .../src/main/java/org/elasticsearch/cli/Command.java | 0 .../src/main/java/org/elasticsearch/cli/ExitCodes.java | 0 .../main/java/org/elasticsearch/cli/MultiCommand.java | 10 ++++------ .../java/org/elasticsearch/cli/SuppressForbidden.java | 0 .../src/main/java/org/elasticsearch/cli/Terminal.java | 0 .../main/java/org/elasticsearch/cli/UserException.java | 0 11 files changed, 5 insertions(+), 7 deletions(-) rename {server => libs}/cli/build.gradle (100%) rename {server => libs}/cli/licenses/jopt-simple-5.0.2.jar.sha1 (100%) rename {server => libs}/cli/licenses/jopt-simple-LICENSE.txt (100%) rename {server => libs}/cli/licenses/jopt-simple-NOTICE.txt (100%) rename {server => libs}/cli/src/main/java/org/elasticsearch/cli/Command.java (100%) rename {server => libs}/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java (100%) rename {server => libs}/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java (99%) rename {server => libs}/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java (100%) rename {server => libs}/cli/src/main/java/org/elasticsearch/cli/Terminal.java (100%) rename {server => libs}/cli/src/main/java/org/elasticsearch/cli/UserException.java (100%) diff --git a/build.gradle b/build.gradle index 620e043d1c0..4721a3520b8 100644 --- a/build.gradle +++ b/build.gradle @@ -205,7 +205,7 @@ subprojects { "org.elasticsearch.gradle:build-tools:${version}": ':build-tools', "org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec', "org.elasticsearch:elasticsearch:${version}": ':server', - "org.elasticsearch:elasticsearch-cli:${version}": ':server:cli', + "org.elasticsearch:elasticsearch-cli:${version}": ':libs:cli', "org.elasticsearch:elasticsearch-core:${version}": ':libs:elasticsearch-core', "org.elasticsearch:elasticsearch-nio:${version}": ':libs:elasticsearch-nio', "org.elasticsearch:elasticsearch-x-content:${version}": ':libs:x-content', diff --git a/server/cli/build.gradle b/libs/cli/build.gradle similarity index 100% rename from server/cli/build.gradle rename to libs/cli/build.gradle diff --git a/server/cli/licenses/jopt-simple-5.0.2.jar.sha1 b/libs/cli/licenses/jopt-simple-5.0.2.jar.sha1 similarity index 100% rename from server/cli/licenses/jopt-simple-5.0.2.jar.sha1 rename to libs/cli/licenses/jopt-simple-5.0.2.jar.sha1 diff --git a/server/cli/licenses/jopt-simple-LICENSE.txt b/libs/cli/licenses/jopt-simple-LICENSE.txt similarity index 100% rename from server/cli/licenses/jopt-simple-LICENSE.txt rename to libs/cli/licenses/jopt-simple-LICENSE.txt diff --git a/server/cli/licenses/jopt-simple-NOTICE.txt b/libs/cli/licenses/jopt-simple-NOTICE.txt similarity index 100% rename from server/cli/licenses/jopt-simple-NOTICE.txt rename to libs/cli/licenses/jopt-simple-NOTICE.txt diff --git a/server/cli/src/main/java/org/elasticsearch/cli/Command.java b/libs/cli/src/main/java/org/elasticsearch/cli/Command.java similarity index 100% rename from server/cli/src/main/java/org/elasticsearch/cli/Command.java rename to libs/cli/src/main/java/org/elasticsearch/cli/Command.java diff --git a/server/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java b/libs/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java similarity index 100% rename from server/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java rename to libs/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java diff --git a/server/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java b/libs/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java similarity index 99% rename from server/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java rename to libs/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java index 054a29e78a6..bcc75a2d1be 100644 --- a/server/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java +++ b/libs/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java @@ -19,17 +19,15 @@ package org.elasticsearch.cli; -import java.io.Closeable; +import joptsimple.NonOptionArgumentSpec; +import joptsimple.OptionSet; +import org.elasticsearch.core.internal.io.IOUtils; + import java.io.IOException; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.Map; -import joptsimple.NonOptionArgumentSpec; -import joptsimple.OptionSet; - -import org.elasticsearch.core.internal.io.IOUtils; - /** * A cli tool which is made up of multiple subcommands. */ diff --git a/server/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java b/libs/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java similarity index 100% rename from server/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java rename to libs/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java diff --git a/server/cli/src/main/java/org/elasticsearch/cli/Terminal.java b/libs/cli/src/main/java/org/elasticsearch/cli/Terminal.java similarity index 100% rename from server/cli/src/main/java/org/elasticsearch/cli/Terminal.java rename to libs/cli/src/main/java/org/elasticsearch/cli/Terminal.java diff --git a/server/cli/src/main/java/org/elasticsearch/cli/UserException.java b/libs/cli/src/main/java/org/elasticsearch/cli/UserException.java similarity index 100% rename from server/cli/src/main/java/org/elasticsearch/cli/UserException.java rename to libs/cli/src/main/java/org/elasticsearch/cli/UserException.java