From c4308ced3e7fa53fb59d8941c717074045bb0798 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 25 Oct 2017 16:02:47 -0500 Subject: [PATCH 01/14] Move the CLI into its own subproject Projects the depend on the CLI currently depend on core. This should not always be the case. The EnvironmentAwareCommand will remain in :core, but the rest of the CLI components have been moved into their own subproject of :core, :core:cli. --- build.gradle | 1 + core/build.gradle | 1 + core/cli/build.gradle | 41 +++++++++++++++++++ .../java/org/elasticsearch/cli/Command.java | 21 ++-------- .../java/org/elasticsearch/cli/ExitCodes.java | 0 .../org/elasticsearch/cli/MultiCommand.java | 0 .../elasticsearch/cli/SuppressForbidden.java | 15 +++++++ .../java/org/elasticsearch/cli/Terminal.java | 2 - .../org/elasticsearch/cli/UserException.java | 0 .../cli/EnvironmentAwareCommand.java | 22 ++++++++++ settings.gradle | 1 + 11 files changed, 85 insertions(+), 19 deletions(-) create mode 100644 core/cli/build.gradle rename core/{ => cli}/src/main/java/org/elasticsearch/cli/Command.java (83%) rename core/{ => cli}/src/main/java/org/elasticsearch/cli/ExitCodes.java (100%) rename core/{ => cli}/src/main/java/org/elasticsearch/cli/MultiCommand.java (100%) create mode 100644 core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java rename core/{ => cli}/src/main/java/org/elasticsearch/cli/Terminal.java (99%) rename core/{ => cli}/src/main/java/org/elasticsearch/cli/UserException.java (100%) diff --git a/build.gradle b/build.gradle index cfc8401a934e0..c950278c3eaf6 100644 --- a/build.gradle +++ b/build.gradle @@ -223,6 +223,7 @@ subprojects { "org.elasticsearch.gradle:build-tools:${version}": ':build-tools', "org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec', "org.elasticsearch:elasticsearch:${version}": ':core', + "org.elasticsearch:elasticsearch-cli:${version}": ':core:cli', "org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest', "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer', "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level', diff --git a/core/build.gradle b/core/build.gradle index fe60cd8b1cf6b..7db20ade3bf91 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -58,6 +58,7 @@ dependencies { compile 'org.elasticsearch:securesm:1.1' // utilities + compile "org.elasticsearch:elasticsearch-cli:${version}" compile 'net.sf.jopt-simple:jopt-simple:5.0.2' compile 'com.carrotsearch:hppc:0.7.1' diff --git a/core/cli/build.gradle b/core/cli/build.gradle new file mode 100644 index 0000000000000..30dfc86dd85d6 --- /dev/null +++ b/core/cli/build.gradle @@ -0,0 +1,41 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.elasticsearch.gradle.precommit.PrecommitTasks + +apply plugin: 'elasticsearch.build' +apply plugin: 'ru.vyarus.animalsniffer' +apply plugin: 'nebula.maven-base-publish' +apply plugin: 'nebula.maven-scm' + +//group = 'org.elasticsearch.client' +archivesBaseName = 'elasticsearch-cli' + +publishing { + publications { + nebula { + artifactId = archivesBaseName + } + } +} + +dependencies { + compile 'net.sf.jopt-simple:jopt-simple:5.0.2' + compile "org.apache.lucene:lucene-core:${versions.lucene}" +} \ No newline at end of file diff --git a/core/src/main/java/org/elasticsearch/cli/Command.java b/core/cli/src/main/java/org/elasticsearch/cli/Command.java similarity index 83% rename from core/src/main/java/org/elasticsearch/cli/Command.java rename to core/cli/src/main/java/org/elasticsearch/cli/Command.java index a60dece26113a..5f05e74bbec02 100644 --- a/core/src/main/java/org/elasticsearch/cli/Command.java +++ b/core/cli/src/main/java/org/elasticsearch/cli/Command.java @@ -23,11 +23,7 @@ import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; -import org.apache.logging.log4j.Level; import org.apache.lucene.util.SetOnce; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.logging.LogConfigurator; -import org.elasticsearch.common.settings.Settings; import java.io.Closeable; import java.io.IOException; @@ -79,12 +75,7 @@ public final int main(String[] args, Terminal terminal) throws Exception { Runtime.getRuntime().addShutdownHook(shutdownHookThread.get()); } - if (shouldConfigureLoggingWithoutConfig()) { - // initialize default for es.logger.level because we will not read the log4j2.properties - final String loggerLevel = System.getProperty("es.logger.level", Level.INFO.name()); - final Settings settings = Settings.builder().put("logger.level", loggerLevel).build(); - LogConfigurator.configureWithoutConfig(settings); - } + beforeExecute(); try { mainWithoutErrorHandling(args, terminal); @@ -103,14 +94,10 @@ public final int main(String[] args, Terminal terminal) throws Exception { } /** - * Indicate whether or not logging should be configured without reading a log4j2.properties. Most commands should do this because we do - * not configure logging for CLI tools. Only commands that configure logging on their own should not do this. - * - * @return true if logging should be configured without reading a log4j2.properties file + * Setup method to be executed before parsing or execution of the command being run. Any exceptions thrown by the + * method will not be cleanly caught by the parser. */ - protected boolean shouldConfigureLoggingWithoutConfig() { - return true; - } + protected void beforeExecute() throws Exception {} /** * Executes the command, but all errors are thrown. diff --git a/core/src/main/java/org/elasticsearch/cli/ExitCodes.java b/core/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java similarity index 100% rename from core/src/main/java/org/elasticsearch/cli/ExitCodes.java rename to core/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java diff --git a/core/src/main/java/org/elasticsearch/cli/MultiCommand.java b/core/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java similarity index 100% rename from core/src/main/java/org/elasticsearch/cli/MultiCommand.java rename to core/cli/src/main/java/org/elasticsearch/cli/MultiCommand.java diff --git a/core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java b/core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java new file mode 100644 index 0000000000000..a83bdebecb455 --- /dev/null +++ b/core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java @@ -0,0 +1,15 @@ +package org.elasticsearch.cli; + + import java.lang.annotation.ElementType; + import java.lang.annotation.Retention; + import java.lang.annotation.RetentionPolicy; + import java.lang.annotation.Target; +/** + * Annotation to suppress forbidden-apis errors inside a whole class, a method, or a field. + */ +@Retention(RetentionPolicy.CLASS) +@Target({ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE }) +public @interface SuppressForbidden { + String reason(); +} + diff --git a/core/src/main/java/org/elasticsearch/cli/Terminal.java b/core/cli/src/main/java/org/elasticsearch/cli/Terminal.java similarity index 99% rename from core/src/main/java/org/elasticsearch/cli/Terminal.java rename to core/cli/src/main/java/org/elasticsearch/cli/Terminal.java index d42e3475dc491..85abd61677445 100644 --- a/core/src/main/java/org/elasticsearch/cli/Terminal.java +++ b/core/cli/src/main/java/org/elasticsearch/cli/Terminal.java @@ -19,8 +19,6 @@ package org.elasticsearch.cli; -import org.elasticsearch.common.SuppressForbidden; - import java.io.BufferedReader; import java.io.Console; import java.io.IOException; diff --git a/core/src/main/java/org/elasticsearch/cli/UserException.java b/core/cli/src/main/java/org/elasticsearch/cli/UserException.java similarity index 100% rename from core/src/main/java/org/elasticsearch/cli/UserException.java rename to core/cli/src/main/java/org/elasticsearch/cli/UserException.java diff --git a/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java b/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java index d9d19a56a2f32..24378ee7b0ff0 100644 --- a/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java +++ b/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java @@ -22,7 +22,9 @@ import joptsimple.OptionSet; import joptsimple.OptionSpec; import joptsimple.util.KeyValuePair; +import org.apache.logging.log4j.Level; import org.elasticsearch.common.SuppressForbidden; +import org.elasticsearch.common.logging.LogConfigurator; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.node.InternalSettingsPreparer; @@ -102,6 +104,26 @@ private static void putSystemPropertyIfSettingIsMissing(final Map Date: Wed, 25 Oct 2017 16:15:49 -0500 Subject: [PATCH 02/14] nit cleanup on file --- core/cli/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/cli/build.gradle b/core/cli/build.gradle index 30dfc86dd85d6..77723d31c6085 100644 --- a/core/cli/build.gradle +++ b/core/cli/build.gradle @@ -24,7 +24,6 @@ apply plugin: 'ru.vyarus.animalsniffer' apply plugin: 'nebula.maven-base-publish' apply plugin: 'nebula.maven-scm' -//group = 'org.elasticsearch.client' archivesBaseName = 'elasticsearch-cli' publishing { @@ -38,4 +37,4 @@ publishing { dependencies { compile 'net.sf.jopt-simple:jopt-simple:5.0.2' compile "org.apache.lucene:lucene-core:${versions.lucene}" -} \ No newline at end of file +} From 7eda8e299cfca98b2ce7cd7198ede935bba0ad75 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Tue, 31 Oct 2017 15:31:13 -0500 Subject: [PATCH 03/14] Incorporate changes from review --- core/build.gradle | 3 ++- core/cli/build.gradle | 18 +++++-------- .../java/org/elasticsearch/cli/Command.java | 15 +++++++---- .../elasticsearch/cli/SuppressForbidden.java | 27 ++++++++++++++++--- .../cli/EnvironmentAwareCommand.java | 2 +- distribution/build.gradle | 1 + .../elasticsearch/cli/EvilCommandTests.java | 8 +++--- 7 files changed, 48 insertions(+), 26 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 7db20ade3bf91..483500c88c174 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -58,11 +58,12 @@ dependencies { compile 'org.elasticsearch:securesm:1.1' // utilities - compile "org.elasticsearch:elasticsearch-cli:${version}" + provided "org.elasticsearch:elasticsearch-cli:${version}" compile 'net.sf.jopt-simple:jopt-simple:5.0.2' compile 'com.carrotsearch:hppc:0.7.1' // time handling, remove with java 8 time + compile 'net.sf.jopt-simple:jopt-simple:5.0.2' compile 'joda-time:joda-time:2.9.5' // json and yaml diff --git a/core/cli/build.gradle b/core/cli/build.gradle index 77723d31c6085..875fb19202123 100644 --- a/core/cli/build.gradle +++ b/core/cli/build.gradle @@ -21,20 +21,16 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks apply plugin: 'elasticsearch.build' apply plugin: 'ru.vyarus.animalsniffer' -apply plugin: 'nebula.maven-base-publish' -apply plugin: 'nebula.maven-scm' archivesBaseName = 'elasticsearch-cli' -publishing { - publications { - nebula { - artifactId = archivesBaseName - } - } +dependencies { + provided 'net.sf.jopt-simple:jopt-simple:5.0.2' } -dependencies { - compile 'net.sf.jopt-simple:jopt-simple:5.0.2' - compile "org.apache.lucene:lucene-core:${versions.lucene}" +dependencyLicenses.enabled = false // need to chat about this +jarHell.enabled = false // need to chat about this + +forbiddenApisMain { + signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')] } diff --git a/core/cli/src/main/java/org/elasticsearch/cli/Command.java b/core/cli/src/main/java/org/elasticsearch/cli/Command.java index 5f05e74bbec02..fec12385f1b32 100644 --- a/core/cli/src/main/java/org/elasticsearch/cli/Command.java +++ b/core/cli/src/main/java/org/elasticsearch/cli/Command.java @@ -23,7 +23,6 @@ import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; -import org.apache.lucene.util.SetOnce; import java.io.Closeable; import java.io.IOException; @@ -51,12 +50,13 @@ public Command(String description) { this.description = description; } - final SetOnce shutdownHookThread = new SetOnce<>(); + private Thread shutdownHookThread; /** Parses options for this command from args and executes it. */ public final int main(String[] args, Terminal terminal) throws Exception { if (addShutdownHook()) { - shutdownHookThread.set(new Thread(() -> { + + shutdownHookThread = new Thread(() -> { try { this.close(); } catch (final IOException e) { @@ -71,8 +71,8 @@ public final int main(String[] args, Terminal terminal) throws Exception { throw new AssertionError(impossible); } } - })); - Runtime.getRuntime().addShutdownHook(shutdownHookThread.get()); + }); + Runtime.getRuntime().addShutdownHook(shutdownHookThread); } beforeExecute(); @@ -153,6 +153,11 @@ protected boolean addShutdownHook() { return true; } + /** Gets the shutdown hook thread if it exists **/ + public Thread getShutdownHookThread() { + return shutdownHookThread; + } + @Override public void close() throws IOException { diff --git a/core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java b/core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java index a83bdebecb455..882414a0eaad3 100644 --- a/core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java +++ b/core/cli/src/main/java/org/elasticsearch/cli/SuppressForbidden.java @@ -1,9 +1,28 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.elasticsearch.cli; - import java.lang.annotation.ElementType; - import java.lang.annotation.Retention; - import java.lang.annotation.RetentionPolicy; - import java.lang.annotation.Target; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + /** * Annotation to suppress forbidden-apis errors inside a whole class, a method, or a field. */ diff --git a/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java b/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java index 24378ee7b0ff0..44fcb37d0835c 100644 --- a/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java +++ b/core/src/main/java/org/elasticsearch/cli/EnvironmentAwareCommand.java @@ -105,7 +105,7 @@ private static void putSystemPropertyIfSettingIsMissing(final Map Date: Wed, 1 Nov 2017 11:04:43 -0500 Subject: [PATCH 04/14] Fixing the concurrent modification error --- distribution/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index 48cdb6df403bd..b1860f8e4b811 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -164,7 +164,7 @@ configure(distributions) { from project(':core').jar from project(':core').configurations.runtime // delay add tools using closures, since they have not yet been configured, so no jar task exists yet - from { from project(':core:cli').jar } + from { project(':core:cli').jar } from { project(':distribution:tools:java-version-checker').jar } from { project(':distribution:tools:plugin-cli').jar } } From 9c61c51b678206bcaab9c15bd5f91a5f90a3ade8 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 1 Nov 2017 14:07:15 -0500 Subject: [PATCH 05/14] Missed dep in tests --- test/framework/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/test/framework/build.gradle b/test/framework/build.gradle index 09382763057c9..558bb2c851cb4 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -22,6 +22,7 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks; dependencies { compile "org.elasticsearch.client:elasticsearch-rest-client:${version}" compile "org.elasticsearch:elasticsearch:${version}" + compile "org.elasticsearch:elasticsearch-cli:${version}" compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" compile "junit:junit:${versions.junit}" compile "org.hamcrest:hamcrest-all:${versions.hamcrest}" From 037259cfbc3b4547c4914750984a5c0efa538d93 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 1 Nov 2017 14:33:32 -0500 Subject: [PATCH 06/14] Missed another, grr --- distribution/tools/plugin-cli/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/tools/plugin-cli/build.gradle b/distribution/tools/plugin-cli/build.gradle index ae3dca9ef87af..36acf2d5e56c0 100644 --- a/distribution/tools/plugin-cli/build.gradle +++ b/distribution/tools/plugin-cli/build.gradle @@ -21,6 +21,7 @@ apply plugin: 'elasticsearch.build' dependencies { provided "org.elasticsearch:elasticsearch:${version}" + compile "org.elasticsearch:elasticsearch-cli:${version}" testCompile "org.elasticsearch.test:framework:${version}" testCompile 'com.google.jimfs:jimfs:1.1' testCompile 'com.google.guava:guava:18.0' From dcdaaf8a9e0835b2cc12f5a803be251c6f781dbf Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 1 Nov 2017 14:54:08 -0500 Subject: [PATCH 07/14] Fixing deplicenses for cli --- distribution/tools/plugin-cli/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/tools/plugin-cli/build.gradle b/distribution/tools/plugin-cli/build.gradle index 36acf2d5e56c0..374690e65acd9 100644 --- a/distribution/tools/plugin-cli/build.gradle +++ b/distribution/tools/plugin-cli/build.gradle @@ -21,7 +21,7 @@ apply plugin: 'elasticsearch.build' dependencies { provided "org.elasticsearch:elasticsearch:${version}" - compile "org.elasticsearch:elasticsearch-cli:${version}" + provided "org.elasticsearch:elasticsearch-cli:${version}" testCompile "org.elasticsearch.test:framework:${version}" testCompile 'com.google.jimfs:jimfs:1.1' testCompile 'com.google.guava:guava:18.0' From 9cd8a8986d1750284789c7fd0025719d7d7d4f19 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 1 Nov 2017 15:10:45 -0500 Subject: [PATCH 08/14] Skip tests as there are none... should we move them? --- core/cli/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/core/cli/build.gradle b/core/cli/build.gradle index 875fb19202123..f911cfee80992 100644 --- a/core/cli/build.gradle +++ b/core/cli/build.gradle @@ -28,6 +28,7 @@ dependencies { provided 'net.sf.jopt-simple:jopt-simple:5.0.2' } +test.enabled = false dependencyLicenses.enabled = false // need to chat about this jarHell.enabled = false // need to chat about this From b1cfecb1ea3394badc3f090e009709ad33553d76 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Mon, 13 Nov 2017 18:14:56 -0500 Subject: [PATCH 09/14] Fixing the jarHell I had gotten myself into with adding the jar and core runtime configurations (which also had cli in it) --- core/build.gradle | 2 +- distribution/build.gradle | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 483500c88c174..519b6f389ee66 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -58,7 +58,7 @@ dependencies { compile 'org.elasticsearch:securesm:1.1' // utilities - provided "org.elasticsearch:elasticsearch-cli:${version}" + compile "org.elasticsearch:elasticsearch-cli:${version}" compile 'net.sf.jopt-simple:jopt-simple:5.0.2' compile 'com.carrotsearch:hppc:0.7.1' diff --git a/distribution/build.gradle b/distribution/build.gradle index b1860f8e4b811..5c809de568d82 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -164,7 +164,6 @@ configure(distributions) { from project(':core').jar from project(':core').configurations.runtime // delay add tools using closures, since they have not yet been configured, so no jar task exists yet - from { project(':core:cli').jar } from { project(':distribution:tools:java-version-checker').jar } from { project(':distribution:tools:plugin-cli').jar } } From 1e0a98cd70fe2051f7ce323a8f8ea12b76659dda Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Mon, 13 Nov 2017 21:30:40 -0500 Subject: [PATCH 10/14] Funky cleanup with deps in the wrong place. I need to figure out why im having to add a es notice/license still. --- core/build.gradle | 3 +- core/cli/build.gradle | 2 +- core/licenses/elasticsearch-cli-LICENSE.txt | 202 ++++++++++++++++++++ core/licenses/elasticsearch-cli-NOTICE.txt | 5 + 4 files changed, 209 insertions(+), 3 deletions(-) create mode 100644 core/licenses/elasticsearch-cli-LICENSE.txt create mode 100644 core/licenses/elasticsearch-cli-NOTICE.txt diff --git a/core/build.gradle b/core/build.gradle index 519b6f389ee66..e86083595e65e 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -59,11 +59,9 @@ dependencies { // utilities compile "org.elasticsearch:elasticsearch-cli:${version}" - compile 'net.sf.jopt-simple:jopt-simple:5.0.2' compile 'com.carrotsearch:hppc:0.7.1' // time handling, remove with java 8 time - compile 'net.sf.jopt-simple:jopt-simple:5.0.2' compile 'joda-time:joda-time:2.9.5' // json and yaml @@ -267,6 +265,7 @@ if (JavaVersion.current() > JavaVersion.VERSION_1_8) { dependencyLicenses { mapping from: /lucene-.*/, to: 'lucene' mapping from: /jackson-.*/, to: 'jackson' + ignoreSha 'elasticsearch-cli' } if (isEclipse == false || project.path == ":core-tests") { diff --git a/core/cli/build.gradle b/core/cli/build.gradle index f911cfee80992..d722f482f5bf3 100644 --- a/core/cli/build.gradle +++ b/core/cli/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'ru.vyarus.animalsniffer' archivesBaseName = 'elasticsearch-cli' dependencies { - provided 'net.sf.jopt-simple:jopt-simple:5.0.2' + compile 'net.sf.jopt-simple:jopt-simple:5.0.2' } test.enabled = false diff --git a/core/licenses/elasticsearch-cli-LICENSE.txt b/core/licenses/elasticsearch-cli-LICENSE.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/core/licenses/elasticsearch-cli-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/core/licenses/elasticsearch-cli-NOTICE.txt b/core/licenses/elasticsearch-cli-NOTICE.txt new file mode 100644 index 0000000000000..643a060cd05c4 --- /dev/null +++ b/core/licenses/elasticsearch-cli-NOTICE.txt @@ -0,0 +1,5 @@ +Elasticsearch +Copyright 2009-2017 Elasticsearch + +This product includes software developed by The Apache Software +Foundation (http://www.apache.org/). From c1790203f54d70fda915c8dc9a1e107275f83ebd Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 15 Nov 2017 17:02:04 -0600 Subject: [PATCH 11/14] Cleanup on licenses --- core/build.gradle | 7 +- core/cli/build.gradle | 4 +- .../licenses/jopt-simple-5.0.2.jar.sha1 | 0 .../licenses/jopt-simple-LICENSE.txt | 0 .../{ => cli}/licenses/jopt-simple-NOTICE.txt | 0 core/licenses/elasticsearch-cli-LICENSE.txt | 202 ------------------ core/licenses/elasticsearch-cli-NOTICE.txt | 5 - 7 files changed, 7 insertions(+), 211 deletions(-) rename core/{ => cli}/licenses/jopt-simple-5.0.2.jar.sha1 (100%) rename core/{ => cli}/licenses/jopt-simple-LICENSE.txt (100%) rename core/{ => cli}/licenses/jopt-simple-NOTICE.txt (100%) delete mode 100644 core/licenses/elasticsearch-cli-LICENSE.txt delete mode 100644 core/licenses/elasticsearch-cli-NOTICE.txt diff --git a/core/build.gradle b/core/build.gradle index e86083595e65e..b5ad8eb5c32a6 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -265,7 +265,12 @@ if (JavaVersion.current() > JavaVersion.VERSION_1_8) { dependencyLicenses { mapping from: /lucene-.*/, to: 'lucene' mapping from: /jackson-.*/, to: 'jackson' - ignoreSha 'elasticsearch-cli' + dependencies = project.configurations.runtime.fileCollection { + it.group.startsWith('org.elasticsearch') == false || + // keep the following org.elasticsearch jars in + (it.name == 'jna' || + it.name == 'securesm') + } } if (isEclipse == false || project.path == ":core-tests") { diff --git a/core/cli/build.gradle b/core/cli/build.gradle index d722f482f5bf3..3a7b84523a491 100644 --- a/core/cli/build.gradle +++ b/core/cli/build.gradle @@ -20,7 +20,6 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks apply plugin: 'elasticsearch.build' -apply plugin: 'ru.vyarus.animalsniffer' archivesBaseName = 'elasticsearch-cli' @@ -29,8 +28,7 @@ dependencies { } test.enabled = false -dependencyLicenses.enabled = false // need to chat about this -jarHell.enabled = false // need to chat about this +//jarHell.enabled = false // need to chat about this forbiddenApisMain { signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')] diff --git a/core/licenses/jopt-simple-5.0.2.jar.sha1 b/core/cli/licenses/jopt-simple-5.0.2.jar.sha1 similarity index 100% rename from core/licenses/jopt-simple-5.0.2.jar.sha1 rename to core/cli/licenses/jopt-simple-5.0.2.jar.sha1 diff --git a/core/licenses/jopt-simple-LICENSE.txt b/core/cli/licenses/jopt-simple-LICENSE.txt similarity index 100% rename from core/licenses/jopt-simple-LICENSE.txt rename to core/cli/licenses/jopt-simple-LICENSE.txt diff --git a/core/licenses/jopt-simple-NOTICE.txt b/core/cli/licenses/jopt-simple-NOTICE.txt similarity index 100% rename from core/licenses/jopt-simple-NOTICE.txt rename to core/cli/licenses/jopt-simple-NOTICE.txt diff --git a/core/licenses/elasticsearch-cli-LICENSE.txt b/core/licenses/elasticsearch-cli-LICENSE.txt deleted file mode 100644 index d645695673349..0000000000000 --- a/core/licenses/elasticsearch-cli-LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/core/licenses/elasticsearch-cli-NOTICE.txt b/core/licenses/elasticsearch-cli-NOTICE.txt deleted file mode 100644 index 643a060cd05c4..0000000000000 --- a/core/licenses/elasticsearch-cli-NOTICE.txt +++ /dev/null @@ -1,5 +0,0 @@ -Elasticsearch -Copyright 2009-2017 Elasticsearch - -This product includes software developed by The Apache Software -Foundation (http://www.apache.org/). From 21ed4451a52dd6c4f77871ae6b9e5490926cc165 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Wed, 15 Nov 2017 19:47:41 -0600 Subject: [PATCH 12/14] Removing jarHell since it does not have access to bootstrap.JarHell --- core/cli/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/build.gradle b/core/cli/build.gradle index 3a7b84523a491..fc93523f6b785 100644 --- a/core/cli/build.gradle +++ b/core/cli/build.gradle @@ -28,7 +28,8 @@ dependencies { } test.enabled = false -//jarHell.enabled = false // need to chat about this +// Since CLI does not depend on :core, it cannot run the jarHell task +jarHell.enabled = false forbiddenApisMain { signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')] From 94bbb74ca88a9c769ff6f4d8207528004251d8e6 Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Thu, 16 Nov 2017 16:03:51 -0600 Subject: [PATCH 13/14] PR nits --- core/cli/src/main/java/org/elasticsearch/cli/Command.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/src/main/java/org/elasticsearch/cli/Command.java b/core/cli/src/main/java/org/elasticsearch/cli/Command.java index fec12385f1b32..d82c9c4ad4e65 100644 --- a/core/cli/src/main/java/org/elasticsearch/cli/Command.java +++ b/core/cli/src/main/java/org/elasticsearch/cli/Command.java @@ -97,7 +97,7 @@ public final int main(String[] args, Terminal terminal) throws Exception { * Setup method to be executed before parsing or execution of the command being run. Any exceptions thrown by the * method will not be cleanly caught by the parser. */ - protected void beforeExecute() throws Exception {} + protected void beforeExecute() {} /** * Executes the command, but all errors are thrown. @@ -154,7 +154,7 @@ protected boolean addShutdownHook() { } /** Gets the shutdown hook thread if it exists **/ - public Thread getShutdownHookThread() { + protected Thread getShutdownHookThread() { return shutdownHookThread; } From 905546b0ec0d59845ce7f22ff7306a03c95a632f Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Fri, 17 Nov 2017 11:23:52 -0600 Subject: [PATCH 14/14] package->default as per PR --- core/cli/src/main/java/org/elasticsearch/cli/Command.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cli/src/main/java/org/elasticsearch/cli/Command.java b/core/cli/src/main/java/org/elasticsearch/cli/Command.java index d82c9c4ad4e65..78a9f31283d00 100644 --- a/core/cli/src/main/java/org/elasticsearch/cli/Command.java +++ b/core/cli/src/main/java/org/elasticsearch/cli/Command.java @@ -154,7 +154,7 @@ protected boolean addShutdownHook() { } /** Gets the shutdown hook thread if it exists **/ - protected Thread getShutdownHookThread() { + Thread getShutdownHookThread() { return shutdownHookThread; }