diff --git a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.0.zip b/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.0.zip deleted file mode 100644 index b40313498f6..00000000000 Binary files a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.0.zip and /dev/null differ diff --git a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.1.zip b/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.1.zip deleted file mode 100644 index eaaa99243da..00000000000 Binary files a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.1.zip and /dev/null differ diff --git a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.2.zip b/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.2.zip deleted file mode 100644 index 8da4324eb0d..00000000000 Binary files a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.0.2.zip and /dev/null differ diff --git a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.1.1.zip b/elasticsearch/src/test/resources/indices/bwc/x-pack-5.1.1.zip deleted file mode 100644 index d66bcb18f5f..00000000000 Binary files a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.1.1.zip and /dev/null differ diff --git a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.1.2.zip b/elasticsearch/src/test/resources/indices/bwc/x-pack-5.1.2.zip deleted file mode 100644 index aaafdfebf3d..00000000000 Binary files a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.1.2.zip and /dev/null differ diff --git a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.2.0.zip b/elasticsearch/src/test/resources/indices/bwc/x-pack-5.2.0.zip deleted file mode 100644 index 734ee8e7777..00000000000 Binary files a/elasticsearch/src/test/resources/indices/bwc/x-pack-5.2.0.zip and /dev/null differ diff --git a/elasticsearch/NOTICE.txt b/plugin/NOTICE.txt similarity index 100% rename from elasticsearch/NOTICE.txt rename to plugin/NOTICE.txt diff --git a/elasticsearch/bin/x-pack/.in.bat b/plugin/bin/x-pack/.in.bat similarity index 100% rename from elasticsearch/bin/x-pack/.in.bat rename to plugin/bin/x-pack/.in.bat diff --git a/elasticsearch/bin/x-pack/certgen b/plugin/bin/x-pack/certgen similarity index 100% rename from elasticsearch/bin/x-pack/certgen rename to plugin/bin/x-pack/certgen diff --git a/elasticsearch/bin/x-pack/certgen.bat b/plugin/bin/x-pack/certgen.bat similarity index 100% rename from elasticsearch/bin/x-pack/certgen.bat rename to plugin/bin/x-pack/certgen.bat diff --git a/elasticsearch/bin/x-pack/croneval b/plugin/bin/x-pack/croneval similarity index 100% rename from elasticsearch/bin/x-pack/croneval rename to plugin/bin/x-pack/croneval diff --git a/elasticsearch/bin/x-pack/croneval.bat b/plugin/bin/x-pack/croneval.bat similarity index 100% rename from elasticsearch/bin/x-pack/croneval.bat rename to plugin/bin/x-pack/croneval.bat diff --git a/elasticsearch/bin/x-pack/extension b/plugin/bin/x-pack/extension similarity index 100% rename from elasticsearch/bin/x-pack/extension rename to plugin/bin/x-pack/extension diff --git a/elasticsearch/bin/x-pack/extension.bat b/plugin/bin/x-pack/extension.bat similarity index 100% rename from elasticsearch/bin/x-pack/extension.bat rename to plugin/bin/x-pack/extension.bat diff --git a/elasticsearch/bin/x-pack/migrate b/plugin/bin/x-pack/migrate similarity index 100% rename from elasticsearch/bin/x-pack/migrate rename to plugin/bin/x-pack/migrate diff --git a/elasticsearch/bin/x-pack/migrate.bat b/plugin/bin/x-pack/migrate.bat similarity index 100% rename from elasticsearch/bin/x-pack/migrate.bat rename to plugin/bin/x-pack/migrate.bat diff --git a/elasticsearch/bin/x-pack/syskeygen b/plugin/bin/x-pack/syskeygen similarity index 100% rename from elasticsearch/bin/x-pack/syskeygen rename to plugin/bin/x-pack/syskeygen diff --git a/elasticsearch/bin/x-pack/syskeygen.bat b/plugin/bin/x-pack/syskeygen.bat similarity index 100% rename from elasticsearch/bin/x-pack/syskeygen.bat rename to plugin/bin/x-pack/syskeygen.bat diff --git a/elasticsearch/bin/x-pack/users b/plugin/bin/x-pack/users similarity index 100% rename from elasticsearch/bin/x-pack/users rename to plugin/bin/x-pack/users diff --git a/elasticsearch/bin/x-pack/users.bat b/plugin/bin/x-pack/users.bat similarity index 100% rename from elasticsearch/bin/x-pack/users.bat rename to plugin/bin/x-pack/users.bat diff --git a/elasticsearch/build.gradle b/plugin/build.gradle similarity index 100% rename from elasticsearch/build.gradle rename to plugin/build.gradle diff --git a/elasticsearch/config/x-pack/log4j2.properties b/plugin/config/x-pack/log4j2.properties similarity index 100% rename from elasticsearch/config/x-pack/log4j2.properties rename to plugin/config/x-pack/log4j2.properties diff --git a/elasticsearch/config/x-pack/role_mapping.yml b/plugin/config/x-pack/role_mapping.yml similarity index 100% rename from elasticsearch/config/x-pack/role_mapping.yml rename to plugin/config/x-pack/role_mapping.yml diff --git a/elasticsearch/config/x-pack/roles.yml b/plugin/config/x-pack/roles.yml similarity index 100% rename from elasticsearch/config/x-pack/roles.yml rename to plugin/config/x-pack/roles.yml diff --git a/elasticsearch/config/x-pack/users b/plugin/config/x-pack/users similarity index 100% rename from elasticsearch/config/x-pack/users rename to plugin/config/x-pack/users diff --git a/elasticsearch/config/x-pack/users_roles b/plugin/config/x-pack/users_roles similarity index 100% rename from elasticsearch/config/x-pack/users_roles rename to plugin/config/x-pack/users_roles diff --git a/elasticsearch/keys/dev/public.key b/plugin/keys/dev/public.key similarity index 100% rename from elasticsearch/keys/dev/public.key rename to plugin/keys/dev/public.key diff --git a/elasticsearch/keys/prod/public.key b/plugin/keys/prod/public.key similarity index 100% rename from elasticsearch/keys/prod/public.key rename to plugin/keys/prod/public.key diff --git a/elasticsearch/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java b/plugin/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java rename to plugin/src/main/java/org/elasticsearch/common/network/InetAddressHelper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/CryptUtils.java b/plugin/src/main/java/org/elasticsearch/license/CryptUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/CryptUtils.java rename to plugin/src/main/java/org/elasticsearch/license/CryptUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/DateUtils.java b/plugin/src/main/java/org/elasticsearch/license/DateUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/DateUtils.java rename to plugin/src/main/java/org/elasticsearch/license/DateUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/DeleteLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/DeleteLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseRequest.java b/plugin/src/main/java/org/elasticsearch/license/DeleteLicenseRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseRequest.java rename to plugin/src/main/java/org/elasticsearch/license/DeleteLicenseRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/license/DeleteLicenseRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/license/DeleteLicenseRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseResponse.java b/plugin/src/main/java/org/elasticsearch/license/DeleteLicenseResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/DeleteLicenseResponse.java rename to plugin/src/main/java/org/elasticsearch/license/DeleteLicenseResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/ExpirationCallback.java b/plugin/src/main/java/org/elasticsearch/license/ExpirationCallback.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/ExpirationCallback.java rename to plugin/src/main/java/org/elasticsearch/license/ExpirationCallback.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/GetLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/GetLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseRequest.java b/plugin/src/main/java/org/elasticsearch/license/GetLicenseRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseRequest.java rename to plugin/src/main/java/org/elasticsearch/license/GetLicenseRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/license/GetLicenseRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/license/GetLicenseRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseResponse.java b/plugin/src/main/java/org/elasticsearch/license/GetLicenseResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/GetLicenseResponse.java rename to plugin/src/main/java/org/elasticsearch/license/GetLicenseResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/License.java b/plugin/src/main/java/org/elasticsearch/license/License.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/License.java rename to plugin/src/main/java/org/elasticsearch/license/License.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/LicenseService.java b/plugin/src/main/java/org/elasticsearch/license/LicenseService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/LicenseService.java rename to plugin/src/main/java/org/elasticsearch/license/LicenseService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/LicenseUtils.java b/plugin/src/main/java/org/elasticsearch/license/LicenseUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/LicenseUtils.java rename to plugin/src/main/java/org/elasticsearch/license/LicenseUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/LicenseVerifier.java b/plugin/src/main/java/org/elasticsearch/license/LicenseVerifier.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/LicenseVerifier.java rename to plugin/src/main/java/org/elasticsearch/license/LicenseVerifier.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/LicensesMetaData.java b/plugin/src/main/java/org/elasticsearch/license/LicensesMetaData.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/LicensesMetaData.java rename to plugin/src/main/java/org/elasticsearch/license/LicensesMetaData.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/LicensesStatus.java b/plugin/src/main/java/org/elasticsearch/license/LicensesStatus.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/LicensesStatus.java rename to plugin/src/main/java/org/elasticsearch/license/LicensesStatus.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/Licensing.java b/plugin/src/main/java/org/elasticsearch/license/Licensing.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/Licensing.java rename to plugin/src/main/java/org/elasticsearch/license/Licensing.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/LicensingClient.java b/plugin/src/main/java/org/elasticsearch/license/LicensingClient.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/LicensingClient.java rename to plugin/src/main/java/org/elasticsearch/license/LicensingClient.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/OperationModeFileWatcher.java b/plugin/src/main/java/org/elasticsearch/license/OperationModeFileWatcher.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/OperationModeFileWatcher.java rename to plugin/src/main/java/org/elasticsearch/license/OperationModeFileWatcher.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/PutLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/PutLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseRequest.java b/plugin/src/main/java/org/elasticsearch/license/PutLicenseRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseRequest.java rename to plugin/src/main/java/org/elasticsearch/license/PutLicenseRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/license/PutLicenseRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/license/PutLicenseRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseResponse.java b/plugin/src/main/java/org/elasticsearch/license/PutLicenseResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/PutLicenseResponse.java rename to plugin/src/main/java/org/elasticsearch/license/PutLicenseResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/TransportDeleteLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/TransportGetLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java b/plugin/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java rename to plugin/src/main/java/org/elasticsearch/license/TransportPutLicenseAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/TrialLicense.java b/plugin/src/main/java/org/elasticsearch/license/TrialLicense.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/TrialLicense.java rename to plugin/src/main/java/org/elasticsearch/license/TrialLicense.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/XPackInfoResponse.java b/plugin/src/main/java/org/elasticsearch/license/XPackInfoResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/XPackInfoResponse.java rename to plugin/src/main/java/org/elasticsearch/license/XPackInfoResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/XPackLicenseState.java b/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/XPackLicenseState.java rename to plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/package-info.java b/plugin/src/main/java/org/elasticsearch/license/package-info.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/license/package-info.java rename to plugin/src/main/java/org/elasticsearch/license/package-info.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/XPackBuild.java b/plugin/src/main/java/org/elasticsearch/xpack/XPackBuild.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/XPackBuild.java rename to plugin/src/main/java/org/elasticsearch/xpack/XPackBuild.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/XPackClient.java b/plugin/src/main/java/org/elasticsearch/xpack/XPackClient.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/XPackClient.java rename to plugin/src/main/java/org/elasticsearch/xpack/XPackClient.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/XPackFeatureSet.java b/plugin/src/main/java/org/elasticsearch/xpack/XPackFeatureSet.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/XPackFeatureSet.java rename to plugin/src/main/java/org/elasticsearch/xpack/XPackFeatureSet.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/XPackPlugin.java b/plugin/src/main/java/org/elasticsearch/xpack/XPackPlugin.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/XPackPlugin.java rename to plugin/src/main/java/org/elasticsearch/xpack/XPackPlugin.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/XPackSettings.java b/plugin/src/main/java/org/elasticsearch/xpack/XPackSettings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/XPackSettings.java rename to plugin/src/main/java/org/elasticsearch/xpack/XPackSettings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java b/plugin/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/TransportXPackInfoAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java b/plugin/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/TransportXPackUsageAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackInfoAction.java b/plugin/src/main/java/org/elasticsearch/xpack/action/XPackInfoAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackInfoAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/XPackInfoAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/XPackInfoRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageAction.java b/plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/action/XPackUsageResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/action/XPackUsageResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/GroupedActionListener.java b/plugin/src/main/java/org/elasticsearch/xpack/common/GroupedActionListener.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/GroupedActionListener.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/GroupedActionListener.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java b/plugin/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/IteratingActionListener.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpClient.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpClient.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpClient.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpClient.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpContentType.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpContentType.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpContentType.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpContentType.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpMethod.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpMethod.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpMethod.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpMethod.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpProxy.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpProxy.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpProxy.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpProxy.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpRequestTemplate.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpRequestTemplate.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpRequestTemplate.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpRequestTemplate.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpSettings.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpSettings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/HttpSettings.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/HttpSettings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/Scheme.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/Scheme.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/Scheme.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/Scheme.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/ApplicableHttpAuth.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/ApplicableHttpAuth.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/ApplicableHttpAuth.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/ApplicableHttpAuth.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuth.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuth.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuth.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuth.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/HttpAuthRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/ApplicableBasicAuth.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/ApplicableBasicAuth.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/ApplicableBasicAuth.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/ApplicableBasicAuth.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuth.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuth.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuth.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuth.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuthFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuthFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuthFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/http/auth/basic/BasicAuthFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/init/proxy/ClientProxy.java b/plugin/src/main/java/org/elasticsearch/xpack/common/init/proxy/ClientProxy.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/init/proxy/ClientProxy.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/init/proxy/ClientProxy.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/secret/Secret.java b/plugin/src/main/java/org/elasticsearch/xpack/common/secret/Secret.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/secret/Secret.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/secret/Secret.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java b/plugin/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/socket/SocketAccess.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/stats/Counters.java b/plugin/src/main/java/org/elasticsearch/xpack/common/stats/Counters.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/stats/Counters.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/stats/Counters.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/text/TextTemplate.java b/plugin/src/main/java/org/elasticsearch/xpack/common/text/TextTemplate.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/text/TextTemplate.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/text/TextTemplate.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/text/TextTemplateEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/common/text/TextTemplateEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/text/TextTemplateEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/text/TextTemplateEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/common/xcontent/XContentUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/common/xcontent/XContentUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/common/xcontent/XContentUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/common/xcontent/XContentUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommand.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommand.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommand.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtension.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionCli.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionInfo.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionPolicy.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurity.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java b/plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java rename to plugin/src/main/java/org/elasticsearch/xpack/extensions/XPackExtensionsService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/Graph.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/Graph.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/Graph.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/Graph.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/GraphFeatureSet.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/Connection.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/Connection.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/Connection.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/Connection.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreAction.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/GraphExploreResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/Hop.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/Hop.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/Hop.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/Hop.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/TransportGraphExploreAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/Vertex.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/Vertex.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/Vertex.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/Vertex.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/VertexRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/action/VertexRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/action/VertexRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/action/VertexRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java b/plugin/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/MlPlugin.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/MlPlugin.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/MlPlugin.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/MlPlugin.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/CloseJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/CloseJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/CloseJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/CloseJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteFilterAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteFilterAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteFilterAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteFilterAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/FlushJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/FlushJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/FlushJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/FlushJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetBucketsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetBucketsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetBucketsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetBucketsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetCategoriesAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetCategoriesAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetCategoriesAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetCategoriesAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsStatsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsStatsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetDatafeedsStatsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetFiltersAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetFiltersAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetFiltersAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetFiltersAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetInfluencersAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetInfluencersAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetInfluencersAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetInfluencersAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetJobsStatsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetRecordsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetRecordsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/GetRecordsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/GetRecordsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/MlDeleteByQueryAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/MlDeleteByQueryAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/MlDeleteByQueryAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/MlDeleteByQueryAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/OpenJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/OpenJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/OpenJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/OpenJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PostDataAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/PostDataAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PostDataAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/PostDataAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PutDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/PutDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PutDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/PutDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PutFilterAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/PutFilterAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PutFilterAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/PutFilterAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PutJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/PutJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/PutJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/PutJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/StartDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/StopDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/StopDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/StopDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/StopDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/TransportJobTaskAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateModelSnapshotAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateProcessAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateProcessAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/UpdateProcessAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/UpdateProcessAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/ValidateDetectorAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/ValidateDetectorAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/ValidateDetectorAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/ValidateDetectorAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/util/PageParams.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/util/PageParams.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/util/PageParams.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/util/PageParams.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/util/QueryPage.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/util/QueryPage.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/action/util/QueryPage.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/action/util/QueryPage.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJob.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunner.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedState.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedState.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedState.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedState.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdate.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdate.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdate.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdate.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/ProblemTracker.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/DataExtractorFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/ExtractorUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorContext.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorContext.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedField.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedField.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedField.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedField.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFields.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorContext.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/JobManager.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimits.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimits.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimits.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimits.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Condition.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Condition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Condition.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Condition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Connective.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Connective.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Connective.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Connective.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DataDescription.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DataDescription.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DataDescription.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DataDescription.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescription.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescription.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescription.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescription.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequency.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequency.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequency.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequency.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DetectionRule.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DetectionRule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/DetectionRule.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/DetectionRule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Detector.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Detector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Detector.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Detector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntime.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntime.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntime.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntime.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Job.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Job.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Job.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Job.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/JobState.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/JobState.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/JobState.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/JobState.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/JobUpdate.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/JobUpdate.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/JobUpdate.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/JobUpdate.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/MlFilter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/MlFilter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/MlFilter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/MlFilter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Operator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Operator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/Operator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/Operator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleCondition.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleCondition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleCondition.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleCondition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleConditionType.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleConditionType.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleConditionType.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/config/RuleConditionType.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/messages/Messages.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/messages/Messages.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/messages/Messages.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/messages/Messages.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationService.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationService.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadata.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadata.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadata.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadata.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndex.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndex.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndex.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/AnomalyDetectorsIndex.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedBucketsIterator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedBucketsIterator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedBucketsIterator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedBucketsIterator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIterator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIterator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIterator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIterator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedInfluencersIterator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedInfluencersIterator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedInfluencersIterator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedInfluencersIterator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedRecordsIterator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedRecordsIterator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedRecordsIterator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedRecordsIterator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedResultsIterator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedResultsIterator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedResultsIterator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BatchedResultsIterator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataCountsPersister.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobProvider.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersister.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersister.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobStorageDeletionTask.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobStorageDeletionTask.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobStorageDeletionTask.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobStorageDeletionTask.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/RecordsQueryBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/RecordsQueryBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/RecordsQueryBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/RecordsQueryBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/CountingInputStream.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/CountingInputStream.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/CountingInputStream.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/CountingInputStream.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeController.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeController.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeController.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/NativeController.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrl.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessPipes.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessPipes.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessPipes.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/ProcessPipes.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcess.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManager.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcess.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcess.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParser.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParser.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgement.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgement.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgement.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgement.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListener.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParams.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParams.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParams.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParams.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParams.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRange.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/CategorizerState.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/CategorizerState.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/CategorizerState.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/CategorizerState.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCounts.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCounts.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCounts.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCounts.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStats.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStats.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStats.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStats.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshot.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshot.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshot.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshot.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelState.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelState.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelState.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelState.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/Quantiles.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/Quantiles.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/Quantiles.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/Quantiles.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractJsonRecordReader.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractJsonRecordReader.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractJsonRecordReader.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractJsonRecordReader.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CannotParseTimestampException.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CannotParseTimestampException.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CannotParseTimestampException.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CannotParseTimestampException.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateTransformer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateTransformer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateTransformer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateTransformer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonRecordReader.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonRecordReader.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonRecordReader.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonRecordReader.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/RecordWriter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/RecordWriter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/RecordWriter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/RecordWriter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReader.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReader.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReader.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReader.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/WriterConstants.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/WriterConstants.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/WriterConstants.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/WriterConstants.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessage.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessage.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessage.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessage.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandler.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandler.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/AbstractLeafNormalizable.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/AbstractLeafNormalizable.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/AbstractLeafNormalizable.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/AbstractLeafNormalizable.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizable.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizable.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizable.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Level.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Level.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Level.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Level.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/MultiplyingNormalizerProcess.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/MultiplyingNormalizerProcess.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/MultiplyingNormalizerProcess.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/MultiplyingNormalizerProcess.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcess.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NativeNormalizerProcessFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizable.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizable.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizable.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizable.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Normalizer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcess.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcess.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcess.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcess.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcessFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcessFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcessFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcessFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResult.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResult.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResult.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResult.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/PartitionScoreNormalizable.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/RecordNormalizable.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/Renormalizer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdater.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/noop/NoOpRenormalizer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/noop/NoOpRenormalizer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/noop/NoOpRenormalizer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/noop/NoOpRenormalizer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandler.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandler.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyCause.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyCause.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyCause.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyCause.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecord.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecord.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecord.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecord.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/AutodetectResult.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Bucket.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Bucket.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Bucket.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Bucket.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinition.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinition.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Influence.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Influence.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Influence.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Influence.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Influencer.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Influencer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Influencer.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Influencer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutput.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutput.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/PartitionScore.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/PartitionScore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/PartitionScore.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/PartitionScore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilities.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilities.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilities.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilities.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNames.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNames.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNames.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNames.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Result.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Result.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/job/results/Result.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/job/results/Result.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditActivity.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditActivity.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditActivity.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditActivity.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditMessage.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditMessage.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditMessage.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/AuditMessage.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/Auditor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/Level.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/Level.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/notifications/Level.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/notifications/Level.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestDeleteDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedStatsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestGetDatafeedsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestPutDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStopDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestUpdateDatafeedAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestDeleteFilterAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestGetFiltersAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/filter/RestPutFilterAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestCloseJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestDeleteJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestFlushJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobStatsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestGetJobsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestOpenJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostJobUpdateAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPutJobAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestDeleteModelSnapshotAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestGetModelSnapshotsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestRevertModelSnapshotAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/modelsnapshots/RestUpdateModelSnapshotAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetBucketsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetCategoriesAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetInfluencersAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/results/RestGetRecordsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateDetectorAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/rest/validate/RestValidateJobConfigAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/DatafeedStateObserver.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/DatafeedStateObserver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/DatafeedStateObserver.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/DatafeedStateObserver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/DomainSplitFunction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/DomainSplitFunction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/DomainSplitFunction.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/DomainSplitFunction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/ExceptionsHelper.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/ExceptionsHelper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/ExceptionsHelper.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/ExceptionsHelper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/JobStateObserver.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/JobStateObserver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/JobStateObserver.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/JobStateObserver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/MlStrings.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/MlStrings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/MlStrings.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/MlStrings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelper.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelper.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimeUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimeUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimeUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimeUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimestampConverter.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimestampConverter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimestampConverter.java rename to plugin/src/main/java/org/elasticsearch/xpack/ml/utils/time/TimestampConverter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoredSystem.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoredSystem.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoredSystem.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoredSystem.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSet.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkAction.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndex.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndex.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndex.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndex.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/client/MonitoringClient.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/Collector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterInfoMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterInfoMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterInfoMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterInfoMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateNodeMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateNodeMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateNodeMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateNodeMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/DiscoveryNodeMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/DiscoveryNodeMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/DiscoveryNodeMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/cluster/DiscoveryNodeMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardMonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollector.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportBulk.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/ExportException.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDoc.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDoc.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDoc.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDoc.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/BackwardsCompatibilityAliasesResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/BackwardsCompatibilityAliasesResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/BackwardsCompatibilityAliasesResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/BackwardsCompatibilityAliasesResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulk.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListener.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListener.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListener.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListener.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListener.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListener.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListener.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListener.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/Scheme.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/Scheme.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/Scheme.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/Scheme.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallback.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallback.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallback.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallback.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallback.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallback.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallback.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallback.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResource.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResource.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalBulk.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/ResolversRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/ResolversRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/ResolversRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/ResolversRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/DiscoveryNodeResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/DiscoveryNodeResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/DiscoveryNodeResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/cluster/DiscoveryNodeResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/rest/MonitoringRestHandler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/monitoring/rest/action/RestMonitoringBulkAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/NotificationService.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/NotificationService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/NotificationService.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/NotificationService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Account.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/Account.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Account.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/Account.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Attachment.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/Attachment.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Attachment.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/Attachment.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Authentication.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/Authentication.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Authentication.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/Authentication.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/DataAttachment.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/DataAttachment.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/DataAttachment.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/DataAttachment.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Email.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/Email.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Email.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/Email.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/EmailService.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/EmailService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/EmailService.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/EmailService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/EmailTemplate.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/EmailTemplate.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/EmailTemplate.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/EmailTemplate.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/HtmlSanitizer.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/HtmlSanitizer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/HtmlSanitizer.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/HtmlSanitizer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Profile.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/Profile.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/Profile.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/Profile.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachment.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachment.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachment.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachment.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParser.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParser.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParser.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParser.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachments.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachments.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachments.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachments.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentsParser.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentsParser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentsParser.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentsParser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParser.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParser.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpRequestAttachment.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpRequestAttachment.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpRequestAttachment.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/HttpRequestAttachment.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachment.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachment.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachment.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachment.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParser.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParser.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/support/BodyPartSource.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/email/support/BodyPartSource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/email/support/BodyPartSource.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/email/support/BodyPartSource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccount.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccount.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccount.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccount.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessage.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessage.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessage.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessage.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatServer.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatServer.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatServer.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatServer.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatService.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatService.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/HipChatService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccount.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccount.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccount.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccount.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/SentMessages.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/SentMessages.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/SentMessages.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/SentMessages.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/UserAccount.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/UserAccount.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/UserAccount.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/UserAccount.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/V1Account.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/V1Account.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/hipchat/V1Account.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/hipchat/V1Account.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/jira/JiraAccount.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/jira/JiraAccount.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/jira/JiraAccount.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/jira/JiraAccount.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/jira/JiraIssue.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/jira/JiraIssue.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/jira/JiraIssue.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/jira/JiraIssue.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/jira/JiraService.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/jira/JiraService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/jira/JiraService.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/jira/JiraService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEvent.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEvent.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEvent.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEvent.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventContext.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaults.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaults.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaults.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaults.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccount.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccount.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccount.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccount.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyService.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyService.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/SentEvent.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/SentEvent.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/pagerduty/SentEvent.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/pagerduty/SentEvent.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/SentMessages.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/SentMessages.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/SentMessages.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/SentMessages.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/SlackAccount.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/SlackAccount.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/SlackAccount.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/SlackAccount.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/SlackService.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/SlackService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/SlackService.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/SlackService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/Attachment.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/Attachment.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/Attachment.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/Attachment.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/DynamicAttachments.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/DynamicAttachments.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/DynamicAttachments.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/DynamicAttachments.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/Field.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/Field.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/Field.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/Field.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/MessageElement.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/MessageElement.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/MessageElement.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/MessageElement.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessage.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessage.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessage.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessage.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaults.java b/plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaults.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaults.java rename to plugin/src/main/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaults.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/CompletionPersistentTaskAction.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/CompletionPersistentTaskAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/CompletionPersistentTaskAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/CompletionPersistentTaskAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinator.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinator.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionExecutor.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionExecutor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionExecutor.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionExecutor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionService.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionService.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentActionService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentTask.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentTask.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentTask.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentTask.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskClusterService.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskClusterService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskClusterService.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentTaskClusterService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgress.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgress.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgress.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgress.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/RemovePersistentTaskAction.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/RemovePersistentTaskAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/RemovePersistentTaskAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/RemovePersistentTaskAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/StartPersistentTaskAction.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/StartPersistentTaskAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/StartPersistentTaskAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/StartPersistentTaskAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/TransportPersistentAction.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/TransportPersistentAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/TransportPersistentAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/TransportPersistentAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskStatusAction.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskStatusAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskStatusAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/UpdatePersistentTaskStatusAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/package-info.java b/plugin/src/main/java/org/elasticsearch/xpack/persistent/package-info.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/persistent/package-info.java rename to plugin/src/main/java/org/elasticsearch/xpack/persistent/package-info.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java b/plugin/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java rename to plugin/src/main/java/org/elasticsearch/xpack/rest/XPackRestHandler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java b/plugin/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackInfoAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java b/plugin/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/rest/action/RestXPackUsageAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/scheduler/SchedulerEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/InternalClient.java b/plugin/src/main/java/org/elasticsearch/xpack/security/InternalClient.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/InternalClient.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/InternalClient.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/Security.java b/plugin/src/main/java/org/elasticsearch/xpack/security/Security.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/Security.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/Security.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java b/plugin/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/SecurityContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java b/plugin/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/SecurityFeatureSet.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleService.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/SecurityLifecycleService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityTemplateService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/SecurityTemplateService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/SecurityTemplateService.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/SecurityTemplateService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionMapper.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionMapper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionMapper.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionMapper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionModule.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionModule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionModule.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/SecurityActionModule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/BulkShardRequestInterceptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldAndDocumentLevelSecurityRequestInterceptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldStatsRequestInterceptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldStatsRequestInterceptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldStatsRequestInterceptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/FieldStatsRequestInterceptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/RequestInterceptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/SearchRequestInterceptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/SearchRequestInterceptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/SearchRequestInterceptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/SearchRequestInterceptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/UpdateRequestInterceptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/UpdateRequestInterceptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/interceptor/UpdateRequestInterceptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/interceptor/UpdateRequestInterceptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/ClearRealmCacheResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/realm/TransportClearRealmCacheAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/ClearRolesCacheResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/DeleteRoleResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/GetRolesResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/PutRoleResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportClearRolesCacheAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/AuthenticateResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/ChangePasswordResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/DeleteUserResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/GetUsersResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/PutUserResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/SetEnabledResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportPutUserAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/UserRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/security/action/user/UserRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/action/user/UserRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/action/user/UserRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditLevel.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditLevel.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditLevel.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditLevel.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrail.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditTrailService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditUtil.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditUtil.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/AuditUtil.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/audit/AuditUtil.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrail.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexNameResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexNameResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexNameResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/audit/index/IndexNameResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java b/plugin/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/Authentication.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationFailureHandler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationToken.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/DefaultAuthenticationFailureHandler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/InternalRealms.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/Realm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateTool.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigrator.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigrator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigrator.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigrator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/esnative/UserAndPassword.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/FileRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/file/tool/UsersTool.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancing.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSearchScope.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapSession.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/pki/PkiRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/pki/X509AuthenticationToken.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/BCrypt.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/BCrypt.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/BCrypt.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/BCrypt.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/CharArrays.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/CharArrays.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/CharArrays.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/CharArrays.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/Hasher.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/Hasher.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/Hasher.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/Hasher.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/SecuredString.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/SecuredString.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/SecuredString.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/SecuredString.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordRealm.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordToken.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizationUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/AuthorizedIndices.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/RoleDescriptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/RoleDescriptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/RoleDescriptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/RoleDescriptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReader.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReader.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControl.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCache.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/ClusterPermission.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissions.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCache.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/IndicesPermission.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/Role.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/permission/RunAsPermission.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/ClusterPrivilege.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/HealthAndStatsPrivilege.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/IndexPrivilege.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/Privilege.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/privilege/SystemPrivilege.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/FileRolesStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/bootstrap/DefaultPasswordBootstrapCheck.java b/plugin/src/main/java/org/elasticsearch/xpack/security/bootstrap/DefaultPasswordBootstrapCheck.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/bootstrap/DefaultPasswordBootstrapCheck.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/bootstrap/DefaultPasswordBootstrapCheck.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java b/plugin/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/client/SecurityClient.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/crypto/CryptoService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/crypto/CryptoService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/crypto/CryptoService.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/crypto/CryptoService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java b/plugin/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyTool.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/RemoteHostHeader.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/RemoteHostHeader.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/RemoteHostHeader.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/RemoteHostHeader.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/RestRequestFilter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/SecurityRestFilter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java b/plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/AbstractSecurityModule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/Automatons.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/Automatons.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/Automatons.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/Automatons.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/Exceptions.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/FileAttributesChecker.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/FileAttributesChecker.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/FileAttributesChecker.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/FileAttributesChecker.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/MetadataUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/MetadataUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/MetadataUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/MetadataUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/NoOpLogger.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/SecurityFiles.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/SecurityFiles.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/SecurityFiles.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/SecurityFiles.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/Validation.java b/plugin/src/main/java/org/elasticsearch/xpack/security/support/Validation.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/support/Validation.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/support/Validation.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/SSLExceptionHelper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/ServerTransportFilter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/filter/IPFilter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/filter/PatternRule.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/filter/PatternRule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/filter/PatternRule.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/filter/PatternRule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRule.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRule.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilter.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java b/plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4Transport.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/AnonymousUser.java b/plugin/src/main/java/org/elasticsearch/xpack/security/user/AnonymousUser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/AnonymousUser.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/user/AnonymousUser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java b/plugin/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/user/ElasticUser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java b/plugin/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/user/KibanaUser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java b/plugin/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/user/LogstashSystemUser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java b/plugin/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/user/SystemUser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/User.java b/plugin/src/main/java/org/elasticsearch/xpack/security/user/User.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/User.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/user/User.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java b/plugin/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java rename to plugin/src/main/java/org/elasticsearch/xpack/security/user/XPackUser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/CertUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/CertificateTool.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/DefaultJDKTrustConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/KeyConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMKeyConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/PEMTrustConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheck.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheck.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheck.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheck.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLClientAuth.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLClientAuth.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLClientAuth.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLClientAuth.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfiguration.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettings.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettings.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreKeyConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/StoreTrustConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustAllConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/TrustConfig.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/VerificationMode.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/VerificationMode.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/ssl/VerificationMode.java rename to plugin/src/main/java/org/elasticsearch/xpack/ssl/VerificationMode.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/support/clock/HaltedClock.java b/plugin/src/main/java/org/elasticsearch/xpack/support/clock/HaltedClock.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/support/clock/HaltedClock.java rename to plugin/src/main/java/org/elasticsearch/xpack/support/clock/HaltedClock.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/template/TemplateUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/template/TemplateUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/template/TemplateUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/template/TemplateUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherFeatureSet.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherMetaData.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherMetaData.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherMetaData.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherMetaData.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherState.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherState.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/WatcherState.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/WatcherState.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/Action.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/Action.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/Action.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/Action.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionBuilders.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionBuilders.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionBuilders.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionBuilders.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionStatus.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionStatus.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionStatus.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionStatus.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapper.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapper.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapper.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ActionWrapper.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ExecutableAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ExecutableAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/ExecutableAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/ExecutableAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/email/ExecutableEmailAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/ExecutableHipChatAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/index/ExecutableIndexAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/ExecutableLoggingAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingLevel.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingLevel.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingLevel.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingLevel.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/ExecutablePagerDutyAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottler.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottler.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottler.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottler.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottler.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottler.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/Throttler.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/Throttler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/Throttler.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/throttler/Throttler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/ExecutableWebhookAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatchSourceBuilders.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/client/WatcherClient.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/AbstractCompareCondition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/AlwaysCondition.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/AlwaysCondition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/AlwaysCondition.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/AlwaysCondition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareCondition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/Condition.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/Condition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/Condition.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/Condition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ConditionRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/LenientCompare.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/NeverCondition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/condition/ScriptCondition.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ActionExecutionMode.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ActionExecutionMode.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ActionExecutionMode.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ActionExecutionMode.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerListener.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerListener.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerListener.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/AsyncTriggerListener.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/CurrentExecutions.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionPhase.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionPhase.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionPhase.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionPhase.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionState.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionState.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionState.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ExecutionState.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/InternalWatchExecutor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/QueuedWatch.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/QueuedWatch.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/QueuedWatch.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/QueuedWatch.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerListener.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerListener.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerListener.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/SyncTriggerListener.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredExecutionContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatch.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionContext.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionResult.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionResult.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionResult.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionResult.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionSnapshot.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionSnapshot.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionSnapshot.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutionSnapshot.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutor.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutor.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutor.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/WatchExecutor.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/Wid.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/Wid.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/execution/Wid.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/execution/Wid.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/history/HistoryStore.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/history/WatchRecord.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/history/WatchRecord.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/history/WatchRecord.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/history/WatchRecord.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/ExecutableInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/ExecutableInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/ExecutableInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/ExecutableInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/Input.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/Input.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/Input.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/Input.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/InputBuilders.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/InputFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/InputRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/http/ExecutableHttpInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInputFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInputFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInputFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/http/HttpInputFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/none/ExecutableNoneInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/none/NoneInputFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/search/ExecutableSearchInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInputFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInputFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInputFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/search/SearchInputFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/simple/ExecutableSimpleInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInput.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/WatcherRestHandler.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestHijackOperationAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/ArrayObjectIterator.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/ArrayObjectIterator.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/ArrayObjectIterator.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/ArrayObjectIterator.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/Exceptions.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/Exceptions.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/Exceptions.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/Exceptions.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/Strings.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/Strings.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/Strings.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/Strings.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/Variables.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/WatcherUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/XContentFilterKeysUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/XContentFilterKeysUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/XContentFilterKeysUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/XContentFilterKeysUtils.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/init/proxy/WatcherClientProxy.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/init/proxy/WatcherClientProxy.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/init/proxy/WatcherClientProxy.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/init/proxy/WatcherClientProxy.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/ObjectPath.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/ObjectPath.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/ObjectPath.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/ObjectPath.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherParams.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherParams.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherParams.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherParams.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherXContentParser.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherXContentParser.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherXContentParser.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/WatcherXContentParser.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSource.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSource.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSource.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSource.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/ExecutableTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/ExecutableTransform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/ExecutableTransform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/ExecutableTransform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/Transform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/Transform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/Transform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/Transform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformBuilders.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/TransformRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ExecutableChainTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ExecutableChainTransform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ExecutableChainTransform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/chain/ExecutableChainTransform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ExecutableScriptTransform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransform.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/SearchTransformFactory.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/WatcherTransportAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/AckWatchResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/ack/TransportAckWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/ActivateWatchResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/activate/TransportActivateWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/TransportDeleteWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/ExecuteWatchResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/execute/TransportExecuteWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/TransportGetWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/PutWatchResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/put/TransportPutWatchAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/TransportWatcherServiceAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/service/WatcherServiceResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/TransportWatcherStatsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsAction.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsAction.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsAction.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequest.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequest.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequest.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequest.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsRequestBuilder.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsResponse.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsResponse.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsResponse.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/stats/WatcherStatsResponse.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/AbstractTriggerEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/AbstractTriggerEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/AbstractTriggerEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/AbstractTriggerEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/Trigger.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/Trigger.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/Trigger.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/Trigger.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerBuilders.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerBuilders.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerBuilders.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerBuilders.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEvent.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEvent.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEvent.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerEvent.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/TriggerService.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTrigger.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/manual/ManualTriggerEvent.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Cron.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronSchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronSchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronSchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronSchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronnableSchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronnableSchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronnableSchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronnableSchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailySchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailySchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailySchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailySchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlySchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalSchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlySchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlySchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlySchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlySchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistry.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistry.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistry.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistry.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTrigger.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEvent.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedules.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedules.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedules.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/Schedules.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklySchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklySchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklySchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklySchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlySchedule.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlySchedule.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlySchedule.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlySchedule.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleTriggerEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleTriggerEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleTriggerEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleTriggerEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleTriggerEngine.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayOfWeek.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayOfWeek.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayOfWeek.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayOfWeek.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/DayTimes.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Month.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Month.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Month.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Month.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/MonthTimes.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Times.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Times.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Times.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/Times.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/WeekTimes.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/WeekTimes.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/WeekTimes.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/WeekTimes.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/support/YearTimes.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalTool.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalTool.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalTool.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalTool.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/Payload.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Payload.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/Payload.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Payload.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/Watch.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStatus.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStatus.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStatus.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStatus.java diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStoreUtils.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStoreUtils.java similarity index 100% rename from elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStoreUtils.java rename to plugin/src/main/java/org/elasticsearch/xpack/watcher/watch/WatchStoreUtils.java diff --git a/elasticsearch/src/main/plugin-metadata/plugin-security.policy b/plugin/src/main/plugin-metadata/plugin-security.policy similarity index 100% rename from elasticsearch/src/main/plugin-metadata/plugin-security.policy rename to plugin/src/main/plugin-metadata/plugin-security.policy diff --git a/elasticsearch/src/main/resources/monitoring-data.json b/plugin/src/main/resources/monitoring-data.json similarity index 100% rename from elasticsearch/src/main/resources/monitoring-data.json rename to plugin/src/main/resources/monitoring-data.json diff --git a/elasticsearch/src/main/resources/monitoring-es.json b/plugin/src/main/resources/monitoring-es.json similarity index 100% rename from elasticsearch/src/main/resources/monitoring-es.json rename to plugin/src/main/resources/monitoring-es.json diff --git a/elasticsearch/src/main/resources/monitoring-kibana.json b/plugin/src/main/resources/monitoring-kibana.json similarity index 100% rename from elasticsearch/src/main/resources/monitoring-kibana.json rename to plugin/src/main/resources/monitoring-kibana.json diff --git a/elasticsearch/src/main/resources/monitoring-logstash.json b/plugin/src/main/resources/monitoring-logstash.json similarity index 100% rename from elasticsearch/src/main/resources/monitoring-logstash.json rename to plugin/src/main/resources/monitoring-logstash.json diff --git a/elasticsearch/src/main/resources/org/elasticsearch/xpack/ml/job/messages/ml_messages.properties b/plugin/src/main/resources/org/elasticsearch/xpack/ml/job/messages/ml_messages.properties similarity index 100% rename from elasticsearch/src/main/resources/org/elasticsearch/xpack/ml/job/messages/ml_messages.properties rename to plugin/src/main/resources/org/elasticsearch/xpack/ml/job/messages/ml_messages.properties diff --git a/elasticsearch/src/main/resources/org/elasticsearch/xpack/ml/transforms/exact.properties b/plugin/src/main/resources/org/elasticsearch/xpack/ml/transforms/exact.properties similarity index 100% rename from elasticsearch/src/main/resources/org/elasticsearch/xpack/ml/transforms/exact.properties rename to plugin/src/main/resources/org/elasticsearch/xpack/ml/transforms/exact.properties diff --git a/elasticsearch/src/main/resources/org/elasticsearch/xpack/security/crypto/migrate.help b/plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/migrate.help similarity index 100% rename from elasticsearch/src/main/resources/org/elasticsearch/xpack/security/crypto/migrate.help rename to plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/migrate.help diff --git a/elasticsearch/src/main/resources/org/elasticsearch/xpack/security/crypto/tool/syskey-generate.help b/plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/tool/syskey-generate.help similarity index 100% rename from elasticsearch/src/main/resources/org/elasticsearch/xpack/security/crypto/tool/syskey-generate.help rename to plugin/src/main/resources/org/elasticsearch/xpack/security/crypto/tool/syskey-generate.help diff --git a/elasticsearch/src/main/resources/org/elasticsearch/xpack/ssl/ca.pem b/plugin/src/main/resources/org/elasticsearch/xpack/ssl/ca.pem similarity index 100% rename from elasticsearch/src/main/resources/org/elasticsearch/xpack/ssl/ca.pem rename to plugin/src/main/resources/org/elasticsearch/xpack/ssl/ca.pem diff --git a/elasticsearch/src/main/resources/org/elasticsearch/xpack/ssl/private.pem b/plugin/src/main/resources/org/elasticsearch/xpack/ssl/private.pem similarity index 100% rename from elasticsearch/src/main/resources/org/elasticsearch/xpack/ssl/private.pem rename to plugin/src/main/resources/org/elasticsearch/xpack/ssl/private.pem diff --git a/elasticsearch/src/main/resources/org/elasticsearch/xpack/ssl/public.pem b/plugin/src/main/resources/org/elasticsearch/xpack/ssl/public.pem similarity index 100% rename from elasticsearch/src/main/resources/org/elasticsearch/xpack/ssl/public.pem rename to plugin/src/main/resources/org/elasticsearch/xpack/ssl/public.pem diff --git a/elasticsearch/src/main/resources/security-index-template.json b/plugin/src/main/resources/security-index-template.json similarity index 100% rename from elasticsearch/src/main/resources/security-index-template.json rename to plugin/src/main/resources/security-index-template.json diff --git a/elasticsearch/src/main/resources/security_audit_log.json b/plugin/src/main/resources/security_audit_log.json similarity index 100% rename from elasticsearch/src/main/resources/security_audit_log.json rename to plugin/src/main/resources/security_audit_log.json diff --git a/elasticsearch/src/main/resources/triggered_watches.json b/plugin/src/main/resources/triggered_watches.json similarity index 100% rename from elasticsearch/src/main/resources/triggered_watches.json rename to plugin/src/main/resources/triggered_watches.json diff --git a/elasticsearch/src/main/resources/watch_history.json b/plugin/src/main/resources/watch_history.json similarity index 100% rename from elasticsearch/src/main/resources/watch_history.json rename to plugin/src/main/resources/watch_history.json diff --git a/elasticsearch/src/main/resources/watches.json b/plugin/src/main/resources/watches.json similarity index 100% rename from elasticsearch/src/main/resources/watches.json rename to plugin/src/main/resources/watches.json diff --git a/elasticsearch/src/test/java/org/elasticsearch/AbstractOldXPackIndicesBackwardsCompatibilityTestCase.java b/plugin/src/test/java/org/elasticsearch/AbstractOldXPackIndicesBackwardsCompatibilityTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/AbstractOldXPackIndicesBackwardsCompatibilityTestCase.java rename to plugin/src/test/java/org/elasticsearch/AbstractOldXPackIndicesBackwardsCompatibilityTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/OldSecurityIndexBackwardsCompatibilityTests.java b/plugin/src/test/java/org/elasticsearch/OldSecurityIndexBackwardsCompatibilityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/OldSecurityIndexBackwardsCompatibilityTests.java rename to plugin/src/test/java/org/elasticsearch/OldSecurityIndexBackwardsCompatibilityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/action/MockIndicesRequest.java b/plugin/src/test/java/org/elasticsearch/action/MockIndicesRequest.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/action/MockIndicesRequest.java rename to plugin/src/test/java/org/elasticsearch/action/MockIndicesRequest.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java b/plugin/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java rename to plugin/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponseTestUtils.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/bench/HasherBenchmark.java b/plugin/src/test/java/org/elasticsearch/bench/HasherBenchmark.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/bench/HasherBenchmark.java rename to plugin/src/test/java/org/elasticsearch/bench/HasherBenchmark.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java b/plugin/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java rename to plugin/src/test/java/org/elasticsearch/http/netty4/Netty4HttpMockUtil.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java b/plugin/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java rename to plugin/src/test/java/org/elasticsearch/integration/AbstractPrivilegeTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java b/plugin/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java rename to plugin/src/test/java/org/elasticsearch/integration/BulkUpdateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java b/plugin/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java rename to plugin/src/test/java/org/elasticsearch/integration/ClearRealmsCacheTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java b/plugin/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java rename to plugin/src/test/java/org/elasticsearch/integration/ClearRolesCacheTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ClusterPrivilegeTests.java b/plugin/src/test/java/org/elasticsearch/integration/ClusterPrivilegeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ClusterPrivilegeTests.java rename to plugin/src/test/java/org/elasticsearch/integration/ClusterPrivilegeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java b/plugin/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java rename to plugin/src/test/java/org/elasticsearch/integration/DateMathExpressionIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java b/plugin/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java rename to plugin/src/test/java/org/elasticsearch/integration/DocumentAndFieldLevelSecurityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java b/plugin/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java rename to plugin/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityRandomTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java b/plugin/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java rename to plugin/src/test/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java b/plugin/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java rename to plugin/src/test/java/org/elasticsearch/integration/FieldLevelSecurityRandomTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java b/plugin/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java rename to plugin/src/test/java/org/elasticsearch/integration/FieldLevelSecurityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java b/plugin/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java rename to plugin/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java b/plugin/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java rename to plugin/src/test/java/org/elasticsearch/integration/IndicesPermissionsWithAliasesWildcardsAndRegexsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java b/plugin/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java rename to plugin/src/test/java/org/elasticsearch/integration/KibanaUserRoleIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java b/plugin/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java rename to plugin/src/test/java/org/elasticsearch/integration/MultipleIndicesPermissionsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java b/plugin/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java rename to plugin/src/test/java/org/elasticsearch/integration/PermissionPrecedenceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ScrollIdSigningTests.java b/plugin/src/test/java/org/elasticsearch/integration/ScrollIdSigningTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ScrollIdSigningTests.java rename to plugin/src/test/java/org/elasticsearch/integration/ScrollIdSigningTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java b/plugin/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java rename to plugin/src/test/java/org/elasticsearch/integration/SecurityCachePermissionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java b/plugin/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java rename to plugin/src/test/java/org/elasticsearch/integration/SecurityClearScrollTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ShrinkIndexWithSecurityTests.java b/plugin/src/test/java/org/elasticsearch/integration/ShrinkIndexWithSecurityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ShrinkIndexWithSecurityTests.java rename to plugin/src/test/java/org/elasticsearch/integration/ShrinkIndexWithSecurityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java b/plugin/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java rename to plugin/src/test/java/org/elasticsearch/integration/ldap/AbstractAdLdapRealmTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ldap/GroupMappingTests.java b/plugin/src/test/java/org/elasticsearch/integration/ldap/GroupMappingTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ldap/GroupMappingTests.java rename to plugin/src/test/java/org/elasticsearch/integration/ldap/GroupMappingTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/ldap/MultiGroupMappingTests.java b/plugin/src/test/java/org/elasticsearch/integration/ldap/MultiGroupMappingTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/integration/ldap/MultiGroupMappingTests.java rename to plugin/src/test/java/org/elasticsearch/integration/ldap/MultiGroupMappingTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java b/plugin/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java rename to plugin/src/test/java/org/elasticsearch/license/AbstractLicenseServiceTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java b/plugin/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java rename to plugin/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java b/plugin/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java rename to plugin/src/test/java/org/elasticsearch/license/ExpirationCallbackTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseClusterChangeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseOperationModeUpdateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseRegistrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseSerializationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterNotRecoveredTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseServiceClusterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseTribeTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseTribeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseTribeTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseTribeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java b/plugin/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicenseUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java b/plugin/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicensesAcknowledgementTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java b/plugin/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicensesManagerServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java b/plugin/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicensesMetaDataSerializationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicensesTransportTests.java b/plugin/src/test/java/org/elasticsearch/license/LicensesTransportTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicensesTransportTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicensesTransportTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/LicensingTests.java b/plugin/src/test/java/org/elasticsearch/license/LicensingTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/LicensingTests.java rename to plugin/src/test/java/org/elasticsearch/license/LicensingTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java b/plugin/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java rename to plugin/src/test/java/org/elasticsearch/license/OperationModeFileWatcherTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java b/plugin/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java rename to plugin/src/test/java/org/elasticsearch/license/PutLicenseResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/TestUtils.java b/plugin/src/test/java/org/elasticsearch/license/TestUtils.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/TestUtils.java rename to plugin/src/test/java/org/elasticsearch/license/TestUtils.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/TrialLicenseTests.java b/plugin/src/test/java/org/elasticsearch/license/TrialLicenseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/TrialLicenseTests.java rename to plugin/src/test/java/org/elasticsearch/license/TrialLicenseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java b/plugin/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java rename to plugin/src/test/java/org/elasticsearch/license/TribeTransportTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java b/plugin/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java rename to plugin/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/script/LatchScriptEngine.java b/plugin/src/test/java/org/elasticsearch/script/LatchScriptEngine.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/script/LatchScriptEngine.java rename to plugin/src/test/java/org/elasticsearch/script/LatchScriptEngine.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java b/plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java rename to plugin/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java rename to plugin/src/test/java/org/elasticsearch/test/NativeRealmIntegTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java rename to plugin/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java b/plugin/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java rename to plugin/src/test/java/org/elasticsearch/test/SecuritySettingsSource.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java b/plugin/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java rename to plugin/src/test/java/org/elasticsearch/test/SecurityTestsUtils.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/SettingsFilterTests.java b/plugin/src/test/java/org/elasticsearch/test/SettingsFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/SettingsFilterTests.java rename to plugin/src/test/java/org/elasticsearch/test/SettingsFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/http/Headers.java b/plugin/src/test/java/org/elasticsearch/test/http/Headers.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/http/Headers.java rename to plugin/src/test/java/org/elasticsearch/test/http/Headers.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/http/MockRequest.java b/plugin/src/test/java/org/elasticsearch/test/http/MockRequest.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/http/MockRequest.java rename to plugin/src/test/java/org/elasticsearch/test/http/MockRequest.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/http/MockResponse.java b/plugin/src/test/java/org/elasticsearch/test/http/MockResponse.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/http/MockResponse.java rename to plugin/src/test/java/org/elasticsearch/test/http/MockResponse.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/test/http/MockWebServer.java b/plugin/src/test/java/org/elasticsearch/test/http/MockWebServer.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/test/http/MockWebServer.java rename to plugin/src/test/java/org/elasticsearch/test/http/MockWebServer.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/transport/KnownActionsTests.java b/plugin/src/test/java/org/elasticsearch/transport/KnownActionsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/transport/KnownActionsTests.java rename to plugin/src/test/java/org/elasticsearch/transport/KnownActionsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java b/plugin/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java rename to plugin/src/test/java/org/elasticsearch/transport/SecurityServerTransportServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/transport/netty4/Netty4MockUtil.java b/plugin/src/test/java/org/elasticsearch/transport/netty4/Netty4MockUtil.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/transport/netty4/Netty4MockUtil.java rename to plugin/src/test/java/org/elasticsearch/transport/netty4/Netty4MockUtil.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java b/plugin/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java rename to plugin/src/test/java/org/elasticsearch/xpack/TestXPackTransportClient.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/TimeWarpedXPackPlugin.java b/plugin/src/test/java/org/elasticsearch/xpack/TimeWarpedXPackPlugin.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/TimeWarpedXPackPlugin.java rename to plugin/src/test/java/org/elasticsearch/xpack/TimeWarpedXPackPlugin.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/action/TransportXPackInfoActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/GroupedActionListenerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/GroupedActionListenerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/GroupedActionListenerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/GroupedActionListenerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/IteratingActionListenerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpClientTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpClientTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpClientTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpClientTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpConnectionTimeoutTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpConnectionTimeoutTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpConnectionTimeoutTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpConnectionTimeoutTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpReadTimeoutTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpReadTimeoutTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpReadTimeoutTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpReadTimeoutTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTemplateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTemplateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTemplateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTemplateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/http/HttpResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/http/HttpResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/stats/CountersTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/stats/CountersTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/stats/CountersTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/stats/CountersTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/common/text/TextTemplateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/common/text/TextTemplateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/common/text/TextTemplateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/common/text/TextTemplateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java b/plugin/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/extensions/InstallXPackExtensionCommandTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java b/plugin/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/extensions/ListXPackExtensionCommandTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java b/plugin/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/extensions/RemoveXPackExtensionCommandTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java b/plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionInfoTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java b/plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionSecurityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java b/plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java rename to plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionTestUtil.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/extensions/XPackExtensionsServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/graph/GraphFeatureSetTests.java b/plugin/src/test/java/org/elasticsearch/xpack/graph/GraphFeatureSetTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/graph/GraphFeatureSetTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/graph/GraphFeatureSetTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/graph/test/GraphTests.java b/plugin/src/test/java/org/elasticsearch/xpack/graph/test/GraphTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/graph/test/GraphTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/graph/test/GraphTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/CloseJobActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CreateFilterActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/CreateFilterActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/CreateFilterActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/CreateFilterActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/DatafeedJobsIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/DatafeedJobsIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/DatafeedJobsIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/DatafeedJobsIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/DeleteDatafeedRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/DeleteJobRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetBucketActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetCategoriesResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedStatsActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetDatafeedsActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetFiltersActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetInfluencersActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobStatsActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetJobsStatsActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetModelSnapshotsActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/GetRecordsActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/OpenJobActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PostDataFlushResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutDatafeedActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutJobActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/PutModelSnapshotDescriptionActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/RevertModelSnapshotActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/StartDatafeedActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/StopDatafeedActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/UpdateDatafeedActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/UpdateProcessActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/ValidateDetectorActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/ValidateJobConfigActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/util/PageParamsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/action/util/QueryPageTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/ChunkingConfigTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedConfigTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobRunnerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedJobValidatorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedStateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/DatafeedUpdateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/ProblemTrackerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/ProblemTrackerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/ProblemTrackerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/ProblemTrackerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationDataExtractorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationTestUtils.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationTestUtils.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationTestUtils.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationTestUtils.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/aggregation/AggregationToJsonProcessorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/chunked/ChunkedDataExtractorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ExtractedFieldsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/ScrollDataExtractorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/datafeed/extractor/scroll/SearchHitToJsonProcessorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/integration/AutodetectResultProcessorIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlJobIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/integration/MlRestTestStateCleaner.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/integration/TooManyJobsIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/JobManagerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisConfigTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/AnalysisLimitsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/ConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/ConnectiveTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DataDescriptionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DataFormatTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultDetectorDescriptionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequencyTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequencyTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequencyTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DefaultFrequencyTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectionRuleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectionRuleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectionRuleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectionRuleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/DetectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntimeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntimeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntimeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/IgnoreDowntimeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/JobStateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/JobTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/JobUpdateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/JobUpdateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/JobUpdateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/JobUpdateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/MlFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfigTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfigTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfigTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/ModelDebugConfigTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/OperatorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/config/RuleConditionTypeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/messages/MessagesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlInitializationServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadataTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadataTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadataTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/metadata/MlMetadataTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BatchedDocumentsIteratorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/BucketsQueryBuilderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ElasticsearchMappingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/InfluencersQueryBuilderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobDataDeleterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobProviderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobRenormalizedResultsPersisterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsPersisterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockBatchedDocumentsIterator.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/MockClientBuilder.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/persistence/ResultsFilterBuilderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/CountingInputStreamTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/CountingInputStreamTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/CountingInputStreamTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/CountingInputStreamTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/DataCountsReporterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/DummyDataCountsReporter.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/NativeControllerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/NativeControllerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/NativeControllerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/NativeControllerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessCtrlTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessPipesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessPipesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessPipesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/ProcessPipesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicatorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectProcessManagerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/BlackHoleAutodetectProcessTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutoDetectResultProcessorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultsParserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushAcknowledgementTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/FlushListenerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/StateProcessorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParamsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParamsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParamsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/DataLoadParamsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParamsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParamsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParamsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/InterimResultsParamsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/params/TimeRangeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/DataCountsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/MemoryStatusTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSizeStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/ModelSnapshotTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/state/QuantilesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AnalysisLimitsWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ControlMsgToProcessWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvDataToProcessWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvParserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/CsvRecordWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DataToProcessWriterFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DateFormatDateTransformerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/DoubleDateTransformerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/FieldConfigWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/JsonDataToProcessWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/LengthEncodedWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/ModelDebugConfigWriterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReaderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReaderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReaderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/autodetect/writer/SimpleJsonRecordReaderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandlerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandlerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandlerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageHandlerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/logging/CppLogMessageTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketInfluencerNormalizableTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/BucketNormalizableTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/InfluencerNormalizableTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResultTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResultTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResultTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerResultTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ScoresUpdaterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/ShortCircuitingRenormalizerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandlerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandlerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandlerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/process/normalizer/output/NormalizerResultHandlerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyCauseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/AnomalyRecordTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/AutodetectResultTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketInfluencerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/BucketTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/CategoryDefinitionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluenceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/InfluencerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutputTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutputTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutputTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/ModelDebugOutputTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/PartitionScoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilitiesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilitiesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilitiesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/PerPartitionMaxProbabilitiesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/job/results/ReservedFieldNamesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/GetModelSnapshotsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/PutModelSnapshotDescriptionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/PutModelSnapshotDescriptionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/PutModelSnapshotDescriptionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/modelsnapshots/PutModelSnapshotDescriptionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditActivityTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditActivityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditActivityTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditActivityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditMessageTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/AuditorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/notifications/LevelTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartJobDatafeedActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartJobDatafeedActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartJobDatafeedActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/rest/datafeeds/RestStartJobDatafeedActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractSerializingTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractSerializingTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractSerializingTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractSerializingTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableXContentTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableXContentTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableXContentTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractStreamableXContentTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractWireSerializingTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractWireSerializingTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/AbstractWireSerializingTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/support/AbstractWireSerializingTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/utils/MlStringsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelperTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelperTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelperTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/utils/NamedPipeHelperTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/utils/time/DateTimeFormatterTimestampConverterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ml/utils/time/TimeUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoredSystemTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringF.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringF.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringF.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringF.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringFeatureSetTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginClientTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginClientTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginClientTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginClientTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringPluginTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTribeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/OldMonitoringIndicesBackwardsCompatibilityTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/OldMonitoringIndicesBackwardsCompatibilityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/OldMonitoringIndicesBackwardsCompatibilityTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/OldMonitoringIndicesBackwardsCompatibilityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkDocTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringBulkTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/MonitoringIndexTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/action/TransportMonitoringBulkActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/AbstractIndicesCleanerTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/CleanerServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/local/LocalIndicesCleanerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/local/LocalIndicesCleanerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/local/LocalIndicesCleanerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/cleaner/local/LocalIndicesCleanerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/AbstractCollectorTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/AbstractCollectorTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/AbstractCollectorTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/AbstractCollectorTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStateCollectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsCollectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexRecoveryCollectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsCollectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsCollectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsCollectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/shards/ShardsCollectorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDocTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDocTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDocTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringDocTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/MonitoringTemplateUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/AbstractPublishableHttpResourceTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/AbstractPublishableHttpResourceTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/AbstractPublishableHttpResourceTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/AbstractPublishableHttpResourceTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/DataTypeMappingHttpResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListenerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListenerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListenerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExportBulkResponseListenerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpHostBuilderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MockHttpResource.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MockHttpResource.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MockHttpResource.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MockHttpResource.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/MultiHttpResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListenerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListenerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListenerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/NodeFailureListenerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PipelineHttpResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SchemeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SchemeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SchemeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SchemeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallbackTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallbackTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallbackTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/SecurityHttpClientConfigCallbackTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TemplateHttpResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallbackTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallbackTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallbackTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/TimeoutRequestConfigCallbackTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTemplateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTemplateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTemplateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTemplateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/DataResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/DataResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/DataResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/DataResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolverTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolverTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolverTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/MonitoringIndexNameResolverTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/TimestampedResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/TimestampedResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/TimestampedResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/TimestampedResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkDataResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/bulk/MonitoringBulkTimestampedResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateNodeResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/DiscoveryNodeResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/DiscoveryNodeResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/DiscoveryNodeResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/DiscoveryNodeResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/MultiNodesStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/MultiNodesStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/MultiNodesStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/MultiNodesStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringInternalClientTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringInternalClientTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringInternalClientTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringInternalClientTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringSettingsFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringSettingsFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringSettingsFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/security/MonitoringSettingsFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/monitoring/test/MonitoringIntegTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/AccountTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/AccountTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/AccountTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/AccountTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/AccountsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/AccountsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/AccountsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/AccountsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/DataAttachmentTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/DataAttachmentTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/DataAttachmentTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/DataAttachmentTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailSecretsIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailSecretsIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailSecretsIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailSecretsIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailTemplateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailTemplateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailTemplateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailTemplateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/EmailTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/EmailTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/HtmlSanitizerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/HtmlSanitizerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/HtmlSanitizerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/HtmlSanitizerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/ManualPublicSmtpServersTester.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/ManualPublicSmtpServersTester.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/ManualPublicSmtpServersTester.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/ManualPublicSmtpServersTester.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/ProfileTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/ProfileTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/ProfileTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/ProfileTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/DataAttachmentParserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParsersTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParsersTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParsersTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/EmailAttachmentParsersTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/HttpEmailAttachementParserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/attachment/ReportingAttachmentParserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/support/EmailServer.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/email/support/EmailServer.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/email/support/EmailServer.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/email/support/EmailServer.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccountsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccountsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccountsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatAccountsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessageTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessageTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessageTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatMessageTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/HipChatServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccountTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccountTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccountTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/IntegrationAccountTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/UserAccountTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/UserAccountTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/UserAccountTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/UserAccountTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/V1AccountTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/V1AccountTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/hipchat/V1AccountTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/hipchat/V1AccountTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/jira/JiraAccountTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/jira/JiraAccountTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/jira/JiraAccountTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/jira/JiraAccountTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/jira/JiraIssueTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/jira/JiraIssueTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/jira/JiraIssueTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/jira/JiraIssueTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaultsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaultsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaultsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/pagerduty/IncidentEventDefaultsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccountsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccountsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccountsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/pagerduty/PagerDutyAccountsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/slack/SlackAccountsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/slack/SlackAccountsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/slack/SlackAccountsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/slack/SlackAccountsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaultsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaultsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaultsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageDefaultsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageTests.java b/plugin/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/notification/slack/message/SlackMessageTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/CancelPersistentTaskResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinatorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinatorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinatorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionCoordinatorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionIT.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionRegistryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionRegistryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionRegistryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionRegistryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionResponseTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionResponseTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionResponseTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentActionResponseTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgressTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgressTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgressTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/PersistentTasksInProgressTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/RestartPersistentTaskRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/StartPersistentActionRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentActionPlugin.java b/plugin/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentActionPlugin.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentActionPlugin.java rename to plugin/src/test/java/org/elasticsearch/xpack/persistent/TestPersistentActionPlugin.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/InternalClientIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/InternalClientIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/InternalClientIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/InternalClientIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/InternalClientTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/InternalClientTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/InternalClientTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/InternalClientTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecurityContextTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityF.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecurityF.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityF.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecurityF.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecurityFeatureSetTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecurityPluginTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecuritySettingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityTemplateServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecurityTemplateServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityTemplateServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecurityTemplateServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityTribeIT.java b/plugin/src/test/java/org/elasticsearch/xpack/security/SecurityTribeIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/SecurityTribeIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/SecurityTribeIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/SecurityActionMapperTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/SecurityActionMapperTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/SecurityActionMapperTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/SecurityActionMapperTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/filter/DestructiveOperationsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/filter/DestructiveOperationsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/filter/DestructiveOperationsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/filter/DestructiveOperationsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/filter/SecurityActionFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/role/PutRoleBuilderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/role/TransportDeleteRoleActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/role/TransportPutRoleActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestBuilderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/PutUserRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportAuthenticateActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportDeleteUserActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportGetUsersActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportPutUserActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/action/user/TransportSetEnabledActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/AuditLevelTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/AuditLevelTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/AuditLevelTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/AuditLevelTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/AuditTrailServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/AuditUtilTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/AuditUtilTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/AuditUtilTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/AuditUtilTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailMutedTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailUpdateMappingTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailUpdateMappingTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailUpdateMappingTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailUpdateMappingTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/RemoteIndexAuditTrailStartingTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/logfile/CapturingLogger.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/RealmSettingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/RunAsIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeMigrateToolTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ESNativeRealmMigrateToolTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigratorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigratorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigratorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeRealmMigratorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmNoDefaultPasswordIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmNoDefaultPasswordIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmNoDefaultPasswordIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmNoDefaultPasswordIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/esnative/ReservedRealmTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/FileRealmTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserPasswdStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/FileUserRolesStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/file/tool/UsersToolTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/AbstractActiveDirectoryIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryGroupsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectoryRealmTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/ActiveDirectorySessionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/GroupsResolverTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/GroupsResolverTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/GroupsResolverTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/GroupsResolverTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapRealmTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapSessionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/LdapUserSearchSessionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/SearchGroupsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/UserAttributeGroupsResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LDAPServersTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LDAPServersTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LDAPServersTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LDAPServersTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapLoadBalancingTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/LdapTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthenticationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiOptionalClientAuthTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/BCryptTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/CachingUsernamePasswordRealmTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/DnRoleMapperTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/HasherTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/SecuredStringTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/SecuredStringTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/SecuredStringTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/SecuredStringTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authc/support/UsernamePasswordTokenTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/AnalyzeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizedIndicesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolverTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/ReadActionsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/ReadActionsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/ReadActionsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/ReadActionsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/RoleDescriptorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/WriteActionsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/WriteActionsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/WriteActionsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/WriteActionsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/DocumentSubsetReaderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldDataCacheWithFieldSubsetReaderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldExtractorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/FieldSubsetReaderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesAccessControlTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/OptOutQueryCacheTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SecurityIndexSearcherWrapperUnitTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/SetSecurityUserProcessorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/permission/FieldPermissionsCacheTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/permission/PermissionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/privilege/PrivilegeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/FileRolesStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/NativeRolesStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/authz/store/ReservedRolesStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/crypto/CryptoServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/crypto/CryptoServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/crypto/CryptoServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/crypto/CryptoServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/crypto/tool/SystemKeyToolTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/rest/RestRequestFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/rest/SecurityRestFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/support/AutomatonsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/FileAttributesCheckerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/support/FileAttributesCheckerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/FileAttributesCheckerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/support/FileAttributesCheckerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/SecurityFilesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/support/SecurityFilesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/SecurityFilesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/support/SecurityFilesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/support/ValidationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java b/plugin/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/test/SecurityAssertions.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/test/SecurityTestUtils.java b/plugin/src/test/java/org/elasticsearch/xpack/security/test/SecurityTestUtils.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/test/SecurityTestUtils.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/test/SecurityTestUtils.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/SecurityServerTransportInterceptorTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/IPFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringUpdateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringUpdateTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringUpdateTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/IpFilteringUpdateTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/PatternRuleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/PatternRuleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/PatternRuleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/PatternRuleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRuleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRuleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRuleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/filter/SecurityIpFilterRuleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/DNSOnlyHostnameVerificationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IPHostnameVerificationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/IpFilterRemoteAddressFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4TransportTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4TransportTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4TransportTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4TransportTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SslHostnameVerificationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslMultiPortTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslNullCipherTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslNullCipherTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslNullCipherTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/transport/ssl/SslNullCipherTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/user/AnonymousUserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/user/SystemUserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/security/user/UserTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/CertUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/CertificateToolTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfigTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfigTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfigTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/GeneratedKeyConfigTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheckTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheckTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheckTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLBootstrapCheckTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLClientAuthTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloaderTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationSettingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLConfigurationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLReloadIntegTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/SSLServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java b/plugin/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java rename to plugin/src/test/java/org/elasticsearch/xpack/ssl/TestsSSLService.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/support/clock/ClockMock.java b/plugin/src/test/java/org/elasticsearch/xpack/support/clock/ClockMock.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/support/clock/ClockMock.java rename to plugin/src/test/java/org/elasticsearch/xpack/support/clock/ClockMock.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/support/clock/ClockTests.java b/plugin/src/test/java/org/elasticsearch/xpack/support/clock/ClockTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/support/clock/ClockTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/support/clock/ClockTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/template/TemplateUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java b/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java rename to plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/OldWatcherIndicesBackwardsCompatibilityTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/OldWatcherIndicesBackwardsCompatibilityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/OldWatcherIndicesBackwardsCompatibilityTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/OldWatcherIndicesBackwardsCompatibilityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherF.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherF.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherF.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherF.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherFeatureSetTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherLifeCycleServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherMetaDataSerializationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginDisableTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginDisableTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginDisableTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginDisableTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/WatcherPluginTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/ActionErrorIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/TimeThrottleIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/email/EmailAttachmentTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/hipchat/HipChatActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/index/IndexActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/ExecutableJiraActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/jira/JiraActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/logging/LoggingActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/pagerduty/PagerDutyActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/ExecutableSlackActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactoryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactoryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactoryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionFactoryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/slack/SlackActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/AckThrottlerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/ActionThrottleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/PeriodThrottlerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/throttler/WatchThrottlerTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookHttpsIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/actions/webhook/WebhookIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/AlwaysConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionSearchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ArrayCompareConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionSearchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/CompareConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/NeverConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionSearchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/condition/ScriptConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ExecutionServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/ManualExecutionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreLifeCycleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreLifeCycleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreLifeCycleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreLifeCycleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreSettingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreSettingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreSettingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreSettingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryStoreTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateEmailMappingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateHttpMappingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateIndexActionMappingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateSearchInputMappingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTimeMappingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTransformMappingsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTransformMappingsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTransformMappingsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/history/HistoryTemplateTransformMappingsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/InputRegistryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/input/InputRegistryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/InputRegistryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/input/InputRegistryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainInputTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ChainIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/input/chain/ExecutableChainInputTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/input/http/HttpInputTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/input/simple/SimpleInputTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchActionTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/security/BasicSecurityTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/security/BasicSecurityTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/security/BasicSecurityTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/security/BasicSecurityTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/DynamicIndexNameIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/DynamicIndexNameIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/DynamicIndexNameIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/DynamicIndexNameIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/FilterXContentTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/VariablesTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherDateTimeUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherIndexTemplateRegistryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/WatcherUtilsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/search/WatcherSearchTemplateRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/MapPathTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/support/xcontent/XContentSourceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/MockTextTemplateEngine.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/MockTextTemplateEngine.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/MockTextTemplateEngine.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/MockTextTemplateEngine.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/TimeWarpedWatcher.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/WatchExecutionContextMockBuilder.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherMatchers.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherMatchers.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherMatchers.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherMatchers.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/WatcherTestUtils.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/bench/ScheduleEngineTriggerBenchmark.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherExecutorServiceBenchmark.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/bench/WatcherScheduleEngineBenchmark.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BasicWatcherTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/BootStrapTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/ExecutionVarsIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HipChatServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HistoryIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/HttpSecretsIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/NoMasterNodeTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/NoMasterNodeTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/NoMasterNodeTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/NoMasterNodeTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/PagerDutyServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchInputTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchTransformTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchTransformTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchTransformTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SearchTransformTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/SlackServiceTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchAckTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatchMetadataTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatcherSettingsFilterTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatcherSettingsFilterTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatcherSettingsFilterTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/test/integration/WatcherSettingsFilterTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transform/TransformIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transform/chain/ChainTransformTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transform/script/ScriptTransformTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/WatchRequestValidationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/activate/ActivateWatchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/delete/DeleteWatchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchRequestTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/execute/ExecuteWatchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/get/GetWatchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchSerializationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/put/PutWatchTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatchStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatchStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatchStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatchStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatcherStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatcherStatsTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatcherStatsTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/transport/action/stats/WatcherStatsTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/ScheduleTriggerEngineMock.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronScheduleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/CronScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailyScheduleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailyScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailyScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/DailyScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlyScheduleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlyScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlyScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/HourlyScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalScheduleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/IntervalScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlyScheduleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlyScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlyScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/MonthlyScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistryTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistryTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleRegistryTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEventTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEventTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEventTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleTriggerEventTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklyScheduleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklyScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklyScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/WeeklyScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlyScheduleTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlyScheduleTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlyScheduleTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/YearlyScheduleTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/BaseTriggerEngineTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/BaseTriggerEngineTestCase.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/BaseTriggerEngineTestCase.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/BaseTriggerEngineTestCase.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleEngineTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleEngineTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleEngineTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/SchedulerScheduleEngineTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/engine/TickerScheduleEngineTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalToolTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalToolTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalToolTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/CronEvalToolTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/EvalCron.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/EvalCron.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/EvalCron.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/trigger/schedule/tool/EvalCron.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchStatusIntegrationTests.java diff --git a/elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java b/plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java similarity index 100% rename from elasticsearch/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java rename to plugin/src/test/java/org/elasticsearch/xpack/watcher/watch/WatchTests.java diff --git a/elasticsearch/src/test/resources/missing-version-security-index-template.json b/plugin/src/test/resources/missing-version-security-index-template.json similarity index 100% rename from elasticsearch/src/test/resources/missing-version-security-index-template.json rename to plugin/src/test/resources/missing-version-security-index-template.json diff --git a/elasticsearch/src/test/resources/monitoring-test.json b/plugin/src/test/resources/monitoring-test.json similarity index 100% rename from elasticsearch/src/test/resources/monitoring-test.json rename to plugin/src/test/resources/monitoring-test.json diff --git a/elasticsearch/src/test/resources/org/elasticsearch/transport/actions b/plugin/src/test/resources/org/elasticsearch/transport/actions similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/transport/actions rename to plugin/src/test/resources/org/elasticsearch/transport/actions diff --git a/elasticsearch/src/test/resources/org/elasticsearch/transport/handlers b/plugin/src/test/resources/org/elasticsearch/transport/handlers similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/transport/handlers rename to plugin/src/test/resources/org/elasticsearch/transport/handlers diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/extensions/security/complex-x-pack-extension-security.policy b/plugin/src/test/resources/org/elasticsearch/xpack/extensions/security/complex-x-pack-extension-security.policy similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/extensions/security/complex-x-pack-extension-security.policy rename to plugin/src/test/resources/org/elasticsearch/xpack/extensions/security/complex-x-pack-extension-security.policy diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/extensions/security/simple-x-pack-extension-security.policy b/plugin/src/test/resources/org/elasticsearch/xpack/extensions/security/simple-x-pack-extension-security.policy similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/extensions/security/simple-x-pack-extension-security.policy rename to plugin/src/test/resources/org/elasticsearch/xpack/extensions/security/simple-x-pack-extension-security.policy diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/extensions/security/unresolved-x-pack-extension-security.policy b/plugin/src/test/resources/org/elasticsearch/xpack/extensions/security/unresolved-x-pack-extension-security.policy similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/extensions/security/unresolved-x-pack-extension-security.policy rename to plugin/src/test/resources/org/elasticsearch/xpack/extensions/security/unresolved-x-pack-extension-security.policy diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/action/role/roles2xformat.json b/plugin/src/test/resources/org/elasticsearch/xpack/security/action/role/roles2xformat.json similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/action/role/roles2xformat.json rename to plugin/src/test/resources/org/elasticsearch/xpack/security/action/role/roles2xformat.json diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/file/users b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/file/users similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/file/users rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/file/users diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/file/users_roles b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/file/users_roles similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/file/users_roles rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/file/users_roles diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad-schema.ldif b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad-schema.ldif similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad-schema.ldif rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad-schema.ldif diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad.ldif b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad.ldif similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad.ldif rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/ad.ldif diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/role_mapping.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/role_mapping.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/role_mapping.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/role_mapping.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithGroupSearch.yaml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithGroupSearch.yaml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithGroupSearch.yaml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithGroupSearch.yaml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithRoleMapping.yaml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithRoleMapping.yaml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithRoleMapping.yaml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldapWithRoleMapping.yaml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldaptrust.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldaptrust.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldaptrust.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/ldaptrust.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/seven-seas.ldif b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/seven-seas.ldif similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/seven-seas.ldif rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/ldap/support/seven-seas.ldif diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/pki/role_mapping.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/pki/role_mapping.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/pki/role_mapping.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/pki/role_mapping.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/support/role_mapping.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authc/support/role_mapping.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authc/support/role_mapping.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authc/support/role_mapping.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/default_roles.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/default_roles.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/default_roles.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/default_roles.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/invalid_roles.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/invalid_roles.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/invalid_roles.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/invalid_roles.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/reserved_roles.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/reserved_roles.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/reserved_roles.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/reserved_roles.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.json b/plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.json similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.json rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.json diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/authz/store/roles2xformat.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode-different-passwords.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode-different-passwords.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode-different-passwords.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode-different-passwords.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.cert b/plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.cert similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.cert rename to plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.cert diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/testnode.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/truststore-testnode-only.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/truststore-testnode-only.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/keystore/truststore-testnode-only.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/keystore/truststore-testnode-only.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/plugin/roles.yml b/plugin/src/test/resources/org/elasticsearch/xpack/security/plugin/roles.yml similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/plugin/roles.yml rename to plugin/src/test/resources/org/elasticsearch/xpack/security/plugin/roles.yml diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/plugin/users b/plugin/src/test/resources/org/elasticsearch/xpack/security/plugin/users similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/plugin/users rename to plugin/src/test/resources/org/elasticsearch/xpack/security/plugin/users diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/plugin/users_roles b/plugin/src/test/resources/org/elasticsearch/xpack/security/plugin/users_roles similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/plugin/users_roles rename to plugin/src/test/resources/org/elasticsearch/xpack/security/plugin/users_roles diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/README.asciidoc b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/README.asciidoc similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/README.asciidoc rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/README.asciidoc diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/active-directory-ca.crt b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/active-directory-ca.crt similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/active-directory-ca.crt rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/active-directory-ca.crt diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.crt b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.crt similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.crt rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.crt diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.der b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.der similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.der rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openldap.der diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openssl_config.cnf b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openssl_config.cnf similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openssl_config.cnf rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/openssl_config.cnf diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.crt b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.crt similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.crt rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.crt diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.p12 b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.p12 similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.p12 rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.p12 diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.pem b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.pem similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.pem rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient-client-profile.pem diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.crt b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.crt similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.crt rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.crt diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.p12 b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.p12 similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.p12 rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.p12 diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.pem b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.pem similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.pem rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testclient.pem diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.crt b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.crt similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.crt rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.crt diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.p12 b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.p12 similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.p12 rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.p12 diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.pem b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.pem similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.pem rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-client-profile.pem diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-different-passwords.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-different-passwords.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-different-passwords.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-different-passwords.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.crt b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.crt similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.crt rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.crt diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-ip-only.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.cert b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.cert similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.cert rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.cert diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode-no-subjaltname.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.crt b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.crt similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.crt rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.crt diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.p12 b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.p12 similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.p12 rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.p12 diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.pem b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.pem similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.pem rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode.pem diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/truststore-testnode-only.jks b/plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/truststore-testnode-only.jks similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/truststore-testnode-only.jks rename to plugin/src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/truststore-testnode-only.jks diff --git a/elasticsearch/src/test/resources/org/elasticsearch/xpack/watcher/actions/email/service/logo.png b/plugin/src/test/resources/org/elasticsearch/xpack/watcher/actions/email/service/logo.png similarity index 100% rename from elasticsearch/src/test/resources/org/elasticsearch/xpack/watcher/actions/email/service/logo.png rename to plugin/src/test/resources/org/elasticsearch/xpack/watcher/actions/email/service/logo.png diff --git a/elasticsearch/src/test/resources/private.key b/plugin/src/test/resources/private.key similarity index 100% rename from elasticsearch/src/test/resources/private.key rename to plugin/src/test/resources/private.key diff --git a/elasticsearch/src/test/resources/public.key b/plugin/src/test/resources/public.key similarity index 100% rename from elasticsearch/src/test/resources/public.key rename to plugin/src/test/resources/public.key diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.graph.explore.json b/plugin/src/test/resources/rest-api-spec/api/xpack.graph.explore.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.graph.explore.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.graph.explore.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.info.json b/plugin/src/test/resources/rest-api-spec/api/xpack.info.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.info.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.info.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.license.delete.json b/plugin/src/test/resources/rest-api-spec/api/xpack.license.delete.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.license.delete.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.license.delete.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.license.get.json b/plugin/src/test/resources/rest-api-spec/api/xpack.license.get.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.license.get.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.license.get.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.license.post.json b/plugin/src/test/resources/rest-api-spec/api/xpack.license.post.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.license.post.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.license.post.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.close_job.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.close_job.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.close_job.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.close_job.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_datafeed.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_datafeed.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_datafeed.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_datafeed.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_filter.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_filter.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_filter.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_filter.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_job.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_job.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_job.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_job.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_model_snapshot.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_model_snapshot.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.delete_model_snapshot.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.delete_model_snapshot.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.flush_job.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.flush_job.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.flush_job.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.flush_job.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_buckets.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_buckets.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_buckets.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_buckets.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_categories.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_categories.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_categories.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_categories.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeed_stats.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeed_stats.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeed_stats.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeed_stats.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeeds.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeeds.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeeds.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_datafeeds.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_filters.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_filters.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_filters.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_filters.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_influencers.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_influencers.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_influencers.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_influencers.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_job_stats.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_job_stats.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_job_stats.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_job_stats.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_jobs.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_jobs.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_jobs.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_jobs.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_model_snapshots.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_model_snapshots.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_model_snapshots.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_model_snapshots.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_records.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_records.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.get_records.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.get_records.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.open_job.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.open_job.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.open_job.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.open_job.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.post_data.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.post_data.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.post_data.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.post_data.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.put_datafeed.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.put_datafeed.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.put_datafeed.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.put_datafeed.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.put_filter.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.put_filter.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.put_filter.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.put_filter.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.put_job.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.put_job.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.put_job.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.put_job.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.revert_model_snapshot.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.revert_model_snapshot.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.revert_model_snapshot.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.revert_model_snapshot.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.start_datafeed.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.start_datafeed.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.start_datafeed.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.start_datafeed.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.stop_datafeed.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.stop_datafeed.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.stop_datafeed.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.stop_datafeed.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.update_datafeed.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.update_datafeed.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.update_datafeed.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.update_datafeed.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.update_job.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.update_job.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.update_job.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.update_job.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.update_model_snapshot.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.update_model_snapshot.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.update_model_snapshot.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.update_model_snapshot.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.validate.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.validate.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.validate.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.validate.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.validate_detector.json b/plugin/src/test/resources/rest-api-spec/api/xpack.ml.validate_detector.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.ml.validate_detector.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.ml.validate_detector.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.monitoring.bulk.json b/plugin/src/test/resources/rest-api-spec/api/xpack.monitoring.bulk.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.monitoring.bulk.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.monitoring.bulk.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.authenticate.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.authenticate.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.authenticate.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.authenticate.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.change_password.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.change_password.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.change_password.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.change_password.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_realms.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_realms.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_realms.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_realms.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_roles.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_roles.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_roles.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.clear_cached_roles.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.delete_role.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.delete_role.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.delete_role.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.delete_role.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.delete_user.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.delete_user.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.delete_user.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.delete_user.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.disable_user.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.disable_user.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.disable_user.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.disable_user.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.enable_user.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.enable_user.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.enable_user.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.enable_user.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.get_role.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.get_role.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.get_role.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.get_role.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.get_user.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.get_user.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.get_user.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.get_user.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.put_role.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.put_role.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.put_role.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.put_role.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.put_user.json b/plugin/src/test/resources/rest-api-spec/api/xpack.security.put_user.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.security.put_user.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.security.put_user.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.usage.json b/plugin/src/test/resources/rest-api-spec/api/xpack.usage.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.usage.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.usage.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.ack_watch.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.activate_watch.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.deactivate_watch.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.delete_watch.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.execute_watch.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.get_watch.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.put_watch.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.restart.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.start.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.start.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.start.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.start.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stats.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json b/plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json rename to plugin/src/test/resources/rest-api-spec/api/xpack.watcher.stop.json diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/authenticate/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/authenticate/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/authenticate/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/authenticate/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/change_password/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/change_password/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/change_password/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/change_password/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/graph/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/graph/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/license/20_put_license.yaml b/plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/license/20_put_license.yaml rename to plugin/src/test/resources/rest-api-spec/test/license/20_put_license.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/custom_all_field.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/custom_all_field.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/custom_all_field.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/custom_all_field.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/datafeeds_crud.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/datafeeds_crud.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/datafeeds_crud.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/datafeeds_crud.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/delete_model_snapshot.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/delete_model_snapshot.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/delete_model_snapshot.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/delete_model_snapshot.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/filter_crud.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/filter_crud.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/filter_crud.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/filter_crud.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/get_datafeeds.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/get_datafeeds.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/get_datafeeds.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/get_datafeeds.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/get_filters.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/get_filters.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/get_filters.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/get_filters.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/get_model_snapshots.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/get_model_snapshots.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/get_model_snapshots.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/get_model_snapshots.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_crud.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/jobs_crud.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_crud.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/jobs_crud.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/jobs_get.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/jobs_get.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_buckets.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_buckets.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_buckets.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_buckets.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_categories.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_categories.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_categories.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_categories.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_influencers.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_influencers.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_influencers.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_influencers.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_records.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_records.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_result_records.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_result_records.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_stats.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_stats.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/jobs_get_stats.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/jobs_get_stats.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/post_data.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/post_data.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/post_data.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/post_data.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/revert_model_snapshot.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/revert_model_snapshot.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/revert_model_snapshot.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/revert_model_snapshot.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/update_model_snapshot.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/update_model_snapshot.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/update_model_snapshot.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/update_model_snapshot.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/validate.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/validate.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/validate.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/validate.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/ml/validate_detector.yaml b/plugin/src/test/resources/rest-api-spec/test/ml/validate_detector.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/ml/validate_detector.yaml rename to plugin/src/test/resources/rest-api-spec/test/ml/validate_detector.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/monitoring/bulk/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/monitoring/bulk/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/monitoring/bulk/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/monitoring/bulk/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/roles/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/roles/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/roles/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/roles/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/roles/11_idx_arrays.yaml b/plugin/src/test/resources/rest-api-spec/test/roles/11_idx_arrays.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/roles/11_idx_arrays.yaml rename to plugin/src/test/resources/rest-api-spec/test/roles/11_idx_arrays.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/roles/20_get_missing.yaml b/plugin/src/test/resources/rest-api-spec/test/roles/20_get_missing.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/roles/20_get_missing.yaml rename to plugin/src/test/resources/rest-api-spec/test/roles/20_get_missing.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/roles/30_prohibited_role_query.yaml b/plugin/src/test/resources/rest-api-spec/test/roles/30_prohibited_role_query.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/roles/30_prohibited_role_query.yaml rename to plugin/src/test/resources/rest-api-spec/test/roles/30_prohibited_role_query.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/set_security_user/10_small_users_one_index.yaml b/plugin/src/test/resources/rest-api-spec/test/set_security_user/10_small_users_one_index.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/set_security_user/10_small_users_one_index.yaml rename to plugin/src/test/resources/rest-api-spec/test/set_security_user/10_small_users_one_index.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/users/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/users/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/users/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/users/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/users/15_overwrite_user.yaml b/plugin/src/test/resources/rest-api-spec/test/users/15_overwrite_user.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/users/15_overwrite_user.yaml rename to plugin/src/test/resources/rest-api-spec/test/users/15_overwrite_user.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/users/16_update_user.yaml b/plugin/src/test/resources/rest-api-spec/test/users/16_update_user.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/users/16_update_user.yaml rename to plugin/src/test/resources/rest-api-spec/test/users/16_update_user.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/users/20_get_missing.yaml b/plugin/src/test/resources/rest-api-spec/test/users/20_get_missing.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/users/20_get_missing.yaml rename to plugin/src/test/resources/rest-api-spec/test/users/20_get_missing.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/users/30_enable_disable.yaml b/plugin/src/test/resources/rest-api-spec/test/users/30_enable_disable.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/users/30_enable_disable.yaml rename to plugin/src/test/resources/rest-api-spec/test/users/30_enable_disable.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/users/31_create_disabled.yaml b/plugin/src/test/resources/rest-api-spec/test/users/31_create_disabled.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/users/31_create_disabled.yaml rename to plugin/src/test/resources/rest-api-spec/test/users/31_create_disabled.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/20_ack_individual_action.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/execute_watch/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/20_missing.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/hijack/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/hijack/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/hijack/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/hijack/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/20_put_watch_with_throttle_period.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/30_put_watch_with_action_throttle_period.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/40_put_watch_as_inactive.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/50_email_attachment_validation.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/60_put_watch_with_action_condition.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/70_put_watch_with_index_action_using_id.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/restart_watcher/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/restart_watcher/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/restart_watcher/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/restart_watcher/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/start_watcher/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/stats/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/watcher/stop_watcher/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/xpack/10_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/xpack/10_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/xpack/10_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/xpack/10_basic.yaml diff --git a/elasticsearch/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml b/plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml similarity index 100% rename from elasticsearch/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml rename to plugin/src/test/resources/rest-api-spec/test/xpack/15_basic.yaml diff --git a/elasticsearch/src/test/resources/wrong-version-security-index-template.json b/plugin/src/test/resources/wrong-version-security-index-template.json similarity index 100% rename from elasticsearch/src/test/resources/wrong-version-security-index-template.json rename to plugin/src/test/resources/wrong-version-security-index-template.json diff --git a/elasticsearch-transport-client/build.gradle b/transport-client/build.gradle similarity index 100% rename from elasticsearch-transport-client/build.gradle rename to transport-client/build.gradle diff --git a/elasticsearch-transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java b/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java similarity index 100% rename from elasticsearch-transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java rename to transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java diff --git a/elasticsearch-transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java b/transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java similarity index 100% rename from elasticsearch-transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java rename to transport-client/src/test/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClientTests.java