From 10f0eaad68557ff2aae92dd65e8f1b9037ea0942 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 25 Apr 2010 23:01:00 +0300 Subject: [PATCH] refactor plugins into sub groups --- .idea/modules.xml | 4 +-- .idea/modules/elasticsearch-root.iml | 6 ++-- .idea/modules/plugin-client-groovy.iml | 1 + ...ents.iml => plugin-mapper-attachments.iml} | 14 ++++---- ...hed.iml => plugin-transport-memcached.iml} | 18 +++++----- build.gradle | 2 +- plugins/client/groovy/build.gradle | 2 +- .../src/main/java/es-plugin.properties | 1 + .../plugin/jgroups/JgroupsPlugin.java | 36 +++++++++++++++++++ plugins/{ => mapper}/attachments/build.gradle | 4 +-- .../src/main/java/es-plugin.properties | 0 .../attachments/AttachmentsIndexModule.java | 0 .../plugin/attachments/AttachmentsPlugin.java | 2 +- .../index/mapper/JsonAttachmentMapper.java | 0 .../mapper/JsonAttachmentMapperService.java | 0 .../plugin/attachments/tika/TikaInstance.java | 0 .../{ => transport}/memcached/build.gradle | 2 +- .../src/main/java/es-plugin.properties | 0 .../memcached/MemcachedPlugin.java | 2 +- .../memcached/MemcachedRestRequest.java | 0 .../memcached/MemcachedServer.java | 0 .../memcached/MemcachedServerModule.java | 0 .../memcached/MemcachedServerTransport.java | 0 .../MemcachedTransportException.java | 0 .../memcached/netty/MemcachedDecoder.java | 0 .../memcached/netty/MemcachedDispatcher.java | 0 .../memcached/netty/MemcachedRestChannel.java | 0 .../netty/NettyMemcachedServerTransport.java | 0 .../NettyMemcachedServerTransportModule.java | 0 .../memcached/netty/OpenChannelsHandler.java | 0 settings.gradle | 4 +-- 31 files changed, 69 insertions(+), 29 deletions(-) rename .idea/modules/{plugin-attachments.iml => plugin-mapper-attachments.iml} (52%) rename .idea/modules/{plugin-memcached.iml => plugin-transport-memcached.iml} (53%) create mode 100644 plugins/discovery/jgroups/src/main/java/es-plugin.properties create mode 100644 plugins/discovery/jgroups/src/main/java/org/elasticsearch/plugin/jgroups/JgroupsPlugin.java rename plugins/{ => mapper}/attachments/build.gradle (95%) rename plugins/{ => mapper}/attachments/src/main/java/es-plugin.properties (100%) rename plugins/{ => mapper}/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsIndexModule.java (100%) rename plugins/{ => mapper}/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java (97%) rename plugins/{ => mapper}/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapper.java (100%) rename plugins/{ => mapper}/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapperService.java (100%) rename plugins/{ => mapper}/attachments/src/main/java/org/elasticsearch/plugin/attachments/tika/TikaInstance.java (100%) rename plugins/{ => transport}/memcached/build.gradle (98%) rename plugins/{ => transport}/memcached/src/main/java/es-plugin.properties (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java (98%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServer.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerModule.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerTransport.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/MemcachedTransportException.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDecoder.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDispatcher.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedRestChannel.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransportModule.java (100%) rename plugins/{ => transport}/memcached/src/main/java/org/elasticsearch/memcached/netty/OpenChannelsHandler.java (100%) diff --git a/.idea/modules.xml b/.idea/modules.xml index 5166d7f0a82..953d428c7a8 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -5,10 +5,10 @@ - - + + diff --git a/.idea/modules/elasticsearch-root.iml b/.idea/modules/elasticsearch-root.iml index bb7f1a17de8..66b963daa8d 100644 --- a/.idea/modules/elasticsearch-root.iml +++ b/.idea/modules/elasticsearch-root.iml @@ -13,8 +13,10 @@ - - + + + + diff --git a/.idea/modules/plugin-client-groovy.iml b/.idea/modules/plugin-client-groovy.iml index 7b0dc7a2cca..c617e349ac1 100644 --- a/.idea/modules/plugin-client-groovy.iml +++ b/.idea/modules/plugin-client-groovy.iml @@ -7,6 +7,7 @@ + diff --git a/.idea/modules/plugin-attachments.iml b/.idea/modules/plugin-mapper-attachments.iml similarity index 52% rename from .idea/modules/plugin-attachments.iml rename to .idea/modules/plugin-mapper-attachments.iml index 08b0312b0fa..4819f633980 100644 --- a/.idea/modules/plugin-attachments.iml +++ b/.idea/modules/plugin-mapper-attachments.iml @@ -1,21 +1,21 @@ - - + + - - - - + + + + + - diff --git a/.idea/modules/plugin-memcached.iml b/.idea/modules/plugin-transport-memcached.iml similarity index 53% rename from .idea/modules/plugin-memcached.iml rename to .idea/modules/plugin-transport-memcached.iml index 373ea015c24..d9c94c4d937 100644 --- a/.idea/modules/plugin-memcached.iml +++ b/.idea/modules/plugin-transport-memcached.iml @@ -1,21 +1,21 @@ - - + + - - - - + + + + - - - + + + diff --git a/build.gradle b/build.gradle index 1c33d18e438..56430c9f063 100644 --- a/build.gradle +++ b/build.gradle @@ -92,7 +92,7 @@ task zip(type: Zip, dependsOn: ['explodedDist']) { } } -task release(dependsOn: [zip, ":plugins-attachments:release"]) << { +task release(dependsOn: [zip]) << { ant.delete(dir: explodedDistDir) } diff --git a/plugins/client/groovy/build.gradle b/plugins/client/groovy/build.gradle index 24e3cfb5ff5..9d771a63c52 100644 --- a/plugins/client/groovy/build.gradle +++ b/plugins/client/groovy/build.gradle @@ -7,7 +7,7 @@ archivesBaseName = "elasticsearch-client-groovy" explodedDistDir = new File(distsDir, 'exploded') -manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::Groovy", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr) +manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::Client::Groovy", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr) configurations.compile.transitive = true configurations.testCompile.transitive = true diff --git a/plugins/discovery/jgroups/src/main/java/es-plugin.properties b/plugins/discovery/jgroups/src/main/java/es-plugin.properties new file mode 100644 index 00000000000..a25fe61e1a8 --- /dev/null +++ b/plugins/discovery/jgroups/src/main/java/es-plugin.properties @@ -0,0 +1 @@ +plugin=org.elasticsearch.plugin.jgroups.JgroupsPlugin diff --git a/plugins/discovery/jgroups/src/main/java/org/elasticsearch/plugin/jgroups/JgroupsPlugin.java b/plugins/discovery/jgroups/src/main/java/org/elasticsearch/plugin/jgroups/JgroupsPlugin.java new file mode 100644 index 00000000000..d271345f515 --- /dev/null +++ b/plugins/discovery/jgroups/src/main/java/org/elasticsearch/plugin/jgroups/JgroupsPlugin.java @@ -0,0 +1,36 @@ +/* + * Licensed to Elastic Search and Shay Banon under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. Elastic Search licenses this + * file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.elasticsearch.plugin.jgroups; + +import org.elasticsearch.plugins.AbstractPlugin; + +/** + * @author kimchy (shay.banon) + */ +public class JgroupsPlugin extends AbstractPlugin { + + @Override public String name() { + return "discovery-plugin"; + } + + @Override public String description() { + return "Adds jgroups as a discovery type"; + } +} diff --git a/plugins/attachments/build.gradle b/plugins/mapper/attachments/build.gradle similarity index 95% rename from plugins/attachments/build.gradle rename to plugins/mapper/attachments/build.gradle index d34ef5dfa50..7d7147dcb9b 100644 --- a/plugins/attachments/build.gradle +++ b/plugins/mapper/attachments/build.gradle @@ -3,11 +3,11 @@ dependsOn(':elasticsearch') apply plugin: 'java' apply plugin: 'maven' -archivesBaseName = "elasticsearch-attachments" +archivesBaseName = "elasticsearch-mapper-attachments" explodedDistDir = new File(distsDir, 'exploded') -manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::Attachments", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr) +manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::Mapper::Attachments", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr) configurations.compile.transitive = true configurations.testCompile.transitive = true diff --git a/plugins/attachments/src/main/java/es-plugin.properties b/plugins/mapper/attachments/src/main/java/es-plugin.properties similarity index 100% rename from plugins/attachments/src/main/java/es-plugin.properties rename to plugins/mapper/attachments/src/main/java/es-plugin.properties diff --git a/plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsIndexModule.java b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsIndexModule.java similarity index 100% rename from plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsIndexModule.java rename to plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsIndexModule.java diff --git a/plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java similarity index 97% rename from plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java rename to plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java index 7a27d9ed64e..7965165adb6 100644 --- a/plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java +++ b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/AttachmentsPlugin.java @@ -32,7 +32,7 @@ import static com.google.common.collect.Lists.*; public class AttachmentsPlugin extends AbstractPlugin { @Override public String name() { - return "attachments"; + return "mapper-attachments"; } @Override public String description() { diff --git a/plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapper.java b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapper.java similarity index 100% rename from plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapper.java rename to plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapper.java diff --git a/plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapperService.java b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapperService.java similarity index 100% rename from plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapperService.java rename to plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/index/mapper/JsonAttachmentMapperService.java diff --git a/plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/tika/TikaInstance.java b/plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/tika/TikaInstance.java similarity index 100% rename from plugins/attachments/src/main/java/org/elasticsearch/plugin/attachments/tika/TikaInstance.java rename to plugins/mapper/attachments/src/main/java/org/elasticsearch/plugin/attachments/tika/TikaInstance.java diff --git a/plugins/memcached/build.gradle b/plugins/transport/memcached/build.gradle similarity index 98% rename from plugins/memcached/build.gradle rename to plugins/transport/memcached/build.gradle index f3585820458..f93af8daaa1 100644 --- a/plugins/memcached/build.gradle +++ b/plugins/transport/memcached/build.gradle @@ -3,7 +3,7 @@ dependsOn(':elasticsearch') apply plugin: 'java' apply plugin: 'maven' -archivesBaseName = "elasticsearch-memcached" +archivesBaseName = "elasticsearch-transport-memcached" explodedDistDir = new File(distsDir, 'exploded') diff --git a/plugins/memcached/src/main/java/es-plugin.properties b/plugins/transport/memcached/src/main/java/es-plugin.properties similarity index 100% rename from plugins/memcached/src/main/java/es-plugin.properties rename to plugins/transport/memcached/src/main/java/es-plugin.properties diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java similarity index 98% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java index 8d63d65754d..ec0d1f6b1be 100644 --- a/plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java +++ b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedPlugin.java @@ -40,7 +40,7 @@ public class MemcachedPlugin extends AbstractPlugin { } @Override public String name() { - return "memcached"; + return "transport-memcached"; } @Override public String description() { diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedRestRequest.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServer.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServer.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServer.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServer.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerModule.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerModule.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerModule.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerModule.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerTransport.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerTransport.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerTransport.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedServerTransport.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedTransportException.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedTransportException.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/MemcachedTransportException.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/MemcachedTransportException.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDecoder.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDecoder.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDecoder.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDecoder.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDispatcher.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDispatcher.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDispatcher.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedDispatcher.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedRestChannel.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedRestChannel.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedRestChannel.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/MemcachedRestChannel.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransport.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransportModule.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransportModule.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransportModule.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/NettyMemcachedServerTransportModule.java diff --git a/plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/OpenChannelsHandler.java b/plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/OpenChannelsHandler.java similarity index 100% rename from plugins/memcached/src/main/java/org/elasticsearch/memcached/netty/OpenChannelsHandler.java rename to plugins/transport/memcached/src/main/java/org/elasticsearch/memcached/netty/OpenChannelsHandler.java diff --git a/settings.gradle b/settings.gradle index bd4957f2087..f3c6c0bf03f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,9 +6,9 @@ include 'test-integration' include 'benchmark-micro' -include 'plugins-attachments' +include 'plugins-mapper-attachments' include 'plugins-client-groovy' -include 'plugins-memcached' +include 'plugins-transport-memcached' include 'plugins-discovery-jgroups' rootProject.name = 'elasticsearch-root'