[Rename] refactor libs/plugin-cli and libs/secure-sm. (#261)

Refactor the libs/plugin-cli and libs/secure-sm modules to rename the package names

- `org.elasticsearch.plugins` to `org.opensearch.plugins`
- `org.elasticsearch.secure_sm` to `org.opensearch.secure_sm`

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit is contained in:
Rabi Panda 2021-03-11 12:11:53 -08:00 committed by Nick Knize
parent 49d2eeae53
commit ad22e7f4a2
10 changed files with 14 additions and 12 deletions

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.plugins; package org.opensearch.plugins;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
apply plugin: 'elasticsearch.publish' apply plugin: 'opensearch.publish'
dependencies { dependencies {
// do not add non-test compile dependencies to secure-sm without a good reason to do so // do not add non-test compile dependencies to secure-sm without a good reason to do so
@ -26,7 +26,7 @@ dependencies {
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}" testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
testImplementation(project(":test:framework")) { testImplementation(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm' exclude group: 'org.opensearch', module: 'opensearch-secure-sm'
} }
} }

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.secure_sm; package org.opensearch.secure_sm;
import java.security.AccessController; import java.security.AccessController;
import java.security.Permission; import java.security.Permission;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.secure_sm; package org.opensearch.secure_sm;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.secure_sm; package org.opensearch.secure_sm;
import java.security.BasicPermission; import java.security.BasicPermission;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.secure_sm; package org.opensearch.secure_sm;
import junit.framework.TestCase; import junit.framework.TestCase;
@ -60,8 +60,8 @@ public class SecureSMTests extends TestCase {
assertTrue(SecureSM.classCanExit("com.carrotsearch.ant.tasks.junit4.slave.JvmExit", SecureSM.TEST_RUNNER_PACKAGES)); assertTrue(SecureSM.classCanExit("com.carrotsearch.ant.tasks.junit4.slave.JvmExit", SecureSM.TEST_RUNNER_PACKAGES));
assertTrue(SecureSM.classCanExit("org.eclipse.jdt.internal.junit.runner.RemoteTestRunner", SecureSM.TEST_RUNNER_PACKAGES)); assertTrue(SecureSM.classCanExit("org.eclipse.jdt.internal.junit.runner.RemoteTestRunner", SecureSM.TEST_RUNNER_PACKAGES));
assertTrue(SecureSM.classCanExit("com.intellij.rt.execution.junit.JUnitStarter", SecureSM.TEST_RUNNER_PACKAGES)); assertTrue(SecureSM.classCanExit("com.intellij.rt.execution.junit.JUnitStarter", SecureSM.TEST_RUNNER_PACKAGES));
assertTrue(SecureSM.classCanExit("org.elasticsearch.Foo", new String[]{"org.elasticsearch.Foo"})); assertTrue(SecureSM.classCanExit("org.opensearch.Foo", new String[]{"org.opensearch.Foo"}));
assertFalse(SecureSM.classCanExit("org.elasticsearch.Foo", new String[]{"org.elasticsearch.Bar"})); assertFalse(SecureSM.classCanExit("org.opensearch.Foo", new String[]{"org.opensearch.Bar"}));
} }
public void testCreateThread() throws Exception { public void testCreateThread() throws Exception {

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.secure_sm; package org.opensearch.secure_sm;
import junit.framework.TestCase; import junit.framework.TestCase;

View File

@ -27,7 +27,7 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.http.HttpTransportSettings; import org.elasticsearch.http.HttpTransportSettings;
import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.plugins.PluginInfo;
import org.elasticsearch.plugins.PluginsService; import org.elasticsearch.plugins.PluginsService;
import org.elasticsearch.secure_sm.SecureSM; import org.opensearch.secure_sm.SecureSM;
import org.elasticsearch.transport.TcpTransport; import org.elasticsearch.transport.TcpTransport;
import java.io.IOException; import java.io.IOException;

View File

@ -19,6 +19,8 @@
package org.elasticsearch.plugins; package org.elasticsearch.plugins;
import org.opensearch.plugins.ExtendedPluginsClassLoader;
import java.util.List; import java.util.List;
/** /**

View File

@ -31,7 +31,7 @@ import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.network.IfConfig; import org.elasticsearch.common.network.IfConfig;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.plugins.PluginInfo;
import org.elasticsearch.secure_sm.SecureSM; import org.opensearch.secure_sm.SecureSM;
import org.junit.Assert; import org.junit.Assert;
import java.io.InputStream; import java.io.InputStream;