Repository: alibaba/fescar (java)

Issue:
rename discover module to discovery
- [ ] I have searched the [issues](https://github.com/alibaba/fescar/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. Issue Description

rename discover module to discovery

### Ⅱ. Describe what happened

  If there is an exception, please attach the exception trace:

```
Just paste your stack trace here!
```


### Ⅲ. Describe what you expected to happen


### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. xxx
2. xxx
3. xxx

### Ⅴ. Anything else we need to know?


### Ⅵ. Environment:

- JDK version :
- OS :
- Others:

Pull request description:
 fix #394 rename discover module to discovery
<!-- Please make sure you have read and understood the contributing guidelines -->

### Ⅰ. Describe what this PR did

rename discover module to discovery

### Ⅱ. Does this pull request fix one issue?

fixes #394 rename discover module to discovery


### Ⅲ. Why don't you add test cases (unit test/integration test)? 


### Ⅳ. Describe how to verify it


### Ⅴ. Special notes for reviews



Patch:
diff --git a/core/pom.xml b/core/pom.xml
index 86eeeca7a..f2aba3fb3 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -39,7 +39,7 @@
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>fescar-discover</artifactId>
+            <artifactId>fescar-discovery</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
diff --git a/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingClient.java b/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingClient.java
index f982418e0..38864905a 100644
--- a/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingClient.java
+++ b/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingClient.java
@@ -40,7 +40,7 @@ import com.alibaba.fescar.core.rpc.RemotingService;
 import com.alibaba.fescar.core.rpc.netty.NettyPoolKey.TransactionRole;
 import com.alibaba.fescar.core.service.ServiceManager;
 import com.alibaba.fescar.core.service.ServiceManagerStaticConfigImpl;
-import com.alibaba.fescar.discover.registry.RegistryFactory;
+import com.alibaba.fescar.discovery.registry.RegistryFactory;
 import com.alibaba.nacos.client.naming.utils.CollectionUtils;
 
 import io.netty.bootstrap.Bootstrap;
diff --git a/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingServer.java b/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingServer.java
index 54498510a..f5f6b8f2a 100644
--- a/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingServer.java
+++ b/core/src/main/java/com/alibaba/fescar/core/rpc/netty/AbstractRpcRemotingServer.java
@@ -22,7 +22,7 @@ import java.util.concurrent.ThreadPoolExecutor;
 import com.alibaba.fescar.common.XID;
 import com.alibaba.fescar.common.thread.NamedThreadFactory;
 import com.alibaba.fescar.core.rpc.RemotingServer;
-import com.alibaba.fescar.discover.registry.RegistryFactory;
+import com.alibaba.fescar.discovery.registry.RegistryFactory;
 
 import io.netty.bootstrap.ServerBootstrap;
 import io.netty.channel.Channel;
diff --git a/core/src/main/java/com/alibaba/fescar/core/rpc/netty/TmRpcClient.java b/core/src/main/java/com/alibaba/fescar/core/rpc/netty/TmRpcClient.java
index 042e1aac6..5cdd38af1 100644
--- a/core/src/main/java/com/alibaba/fescar/core/rpc/netty/TmRpcClient.java
+++ b/core/src/main/java/com/alibaba/fescar/core/rpc/netty/TmRpcClient.java
@@ -43,8 +43,8 @@ import com.alibaba.fescar.core.protocol.ResultCode;
 import com.alibaba.fescar.core.protocol.transaction.GlobalBeginResponse;
 import com.alibaba.fescar.core.rpc.netty.NettyPoolKey.TransactionRole;
 import com.alibaba.fescar.core.service.ConfigurationKeys;
-import com.alibaba.fescar.discover.loadbalance.LoadBalanceFactory;
-import com.alibaba.fescar.discover.registry.RegistryFactory;
+import com.alibaba.fescar.discovery.loadbalance.LoadBalanceFactory;
+import com.alibaba.fescar.discovery.registry.RegistryFactory;
 import com.alibaba.nacos.client.naming.utils.CollectionUtils;
 
 import io.netty.channel.Channel;
diff --git a/discover/src/main/resources/META-INF/services/com.alibaba.fescar.discover.loadbalance.LoadBalance b/discover/src/main/resources/META-INF/services/com.alibaba.fescar.discover.loadbalance.LoadBalance
deleted file mode 100644
index 030b91749..000000000
--- a/discover/src/main/resources/META-INF/services/com.alibaba.fescar.discover.loadbalance.LoadBalance
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-#  Copyright 1999-2018 Alibaba Group Holding Ltd.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-
-com.alibaba.fescar.discover.loadbalance.RoundRobinLoadBalance
\ No newline at end of file
diff --git a/discover/pom.xml b/discovery/pom.xml
similarity index 94%
rename from discover/pom.xml
rename to discovery/pom.xml
index 179e4fb05..89f33fe68 100644
--- a/discover/pom.xml
+++ b/discovery/pom.xml
@@ -25,8 +25,8 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>jar</packaging>
-    <artifactId>fescar-discover</artifactId>
-    <name>fescar-discover ${project.version}</name>
+    <artifactId>fescar-discovery</artifactId>
+    <name>fescar-discovery ${project.version}</name>
 
     <dependencies>
         <dependency>
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/AbstractLoadBalance.java b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/AbstractLoadBalance.java
similarity index 95%
rename from discover/src/main/java/com/alibaba/fescar/discover/loadbalance/AbstractLoadBalance.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/AbstractLoadBalance.java
index 23154c103..6b6fad1ac 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/AbstractLoadBalance.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/AbstractLoadBalance.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.loadbalance;
+package com.alibaba.fescar.discovery.loadbalance;
 
 import java.util.List;
 
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/LoadBalance.java b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/LoadBalance.java
similarity index 95%
rename from discover/src/main/java/com/alibaba/fescar/discover/loadbalance/LoadBalance.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/LoadBalance.java
index 77ce2c710..5895f1f0a 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/LoadBalance.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/LoadBalance.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.loadbalance;
+package com.alibaba.fescar.discovery.loadbalance;
 
 import java.util.List;
 
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/LoadBalanceFactory.java b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/LoadBalanceFactory.java
similarity index 95%
rename from discover/src/main/java/com/alibaba/fescar/discover/loadbalance/LoadBalanceFactory.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/LoadBalanceFactory.java
index 601d0c6c5..0af624235 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/LoadBalanceFactory.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/LoadBalanceFactory.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.loadbalance;
+package com.alibaba.fescar.discovery.loadbalance;
 
 import java.util.ServiceLoader;
 
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/RoundRobinLoadBalance.java b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/RoundRobinLoadBalance.java
similarity index 94%
rename from discover/src/main/java/com/alibaba/fescar/discover/loadbalance/RoundRobinLoadBalance.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/RoundRobinLoadBalance.java
index 1dec980c1..86dbfad96 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/loadbalance/RoundRobinLoadBalance.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/loadbalance/RoundRobinLoadBalance.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.loadbalance;
+package com.alibaba.fescar.discovery.loadbalance;
 
 import java.util.List;
 
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/registry/FileRegistryServiceImpl.java b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/FileRegistryServiceImpl.java
similarity index 98%
rename from discover/src/main/java/com/alibaba/fescar/discover/registry/FileRegistryServiceImpl.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/registry/FileRegistryServiceImpl.java
index 2e56cb139..9ab1163be 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/registry/FileRegistryServiceImpl.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/FileRegistryServiceImpl.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.registry;
+package com.alibaba.fescar.discovery.registry;
 
 import java.net.InetSocketAddress;
 import java.util.ArrayList;
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/registry/NacosRegistryServiceImpl.java b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/NacosRegistryServiceImpl.java
similarity index 99%
rename from discover/src/main/java/com/alibaba/fescar/discover/registry/NacosRegistryServiceImpl.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/registry/NacosRegistryServiceImpl.java
index 03885dc3c..10e03f605 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/registry/NacosRegistryServiceImpl.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/NacosRegistryServiceImpl.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.registry;
+package com.alibaba.fescar.discovery.registry;
 
 import java.net.InetSocketAddress;
 import java.util.ArrayList;
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/registry/RegistryFactory.java b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/RegistryFactory.java
similarity index 97%
rename from discover/src/main/java/com/alibaba/fescar/discover/registry/RegistryFactory.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/registry/RegistryFactory.java
index 3716eb1c5..acfc71ccd 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/registry/RegistryFactory.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/RegistryFactory.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.registry;
+package com.alibaba.fescar.discovery.registry;
 
 import com.alibaba.fescar.common.exception.NotSupportYetException;
 import com.alibaba.fescar.config.ConfigType;
diff --git a/discover/src/main/java/com/alibaba/fescar/discover/registry/RegistryService.java b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/RegistryService.java
similarity index 97%
rename from discover/src/main/java/com/alibaba/fescar/discover/registry/RegistryService.java
rename to discovery/src/main/java/com/alibaba/fescar/discovery/registry/RegistryService.java
index acdf4a758..61a903629 100644
--- a/discover/src/main/java/com/alibaba/fescar/discover/registry/RegistryService.java
+++ b/discovery/src/main/java/com/alibaba/fescar/discovery/registry/RegistryService.java
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.registry;
+package com.alibaba.fescar.discovery.registry;
 
 import java.net.InetSocketAddress;
 import java.util.List;
diff --git a/discovery/src/main/resources/META-INF/services/com.alibaba.fescar.discovery.loadbalance.LoadBalance b/discovery/src/main/resources/META-INF/services/com.alibaba.fescar.discovery.loadbalance.LoadBalance
new file mode 100644
index 000000000..563e2a7cf
--- /dev/null
+++ b/discovery/src/main/resources/META-INF/services/com.alibaba.fescar.discovery.loadbalance.LoadBalance
@@ -0,0 +1,33 @@
+#
+#  Copyright 1999-2018 Alibaba Group Holding Ltd.
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+#
+#  Copyright 1999-2018 Alibaba Group Holding Ltd.
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+com.alibaba.fescar.discovery.loadbalance.RoundRobinLoadBalance
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 78438e76c..24db96be2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,8 +32,8 @@
         <module>tm</module>
         <module>spring</module>
         <module>dubbo</module>
+        <module>discovery</module>
         <module>test</module>
-        <module>discover</module>
     </modules>
     <packaging>pom</packaging>
 
@@ -148,7 +148,7 @@
             </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
-                <artifactId>fescar-discover</artifactId>
+                <artifactId>fescar-discovery</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>


Test patch:
diff --git a/discover/src/test/java/com/alibaba/fescar/discover/loadbalance/LoadBalanceFactoryTest.java b/discovery/src/test/java/com/alibaba/fescar/discovery/loadbalance/LoadBalanceFactoryTest.java
similarity index 93%
rename from discover/src/test/java/com/alibaba/fescar/discover/loadbalance/LoadBalanceFactoryTest.java
rename to discovery/src/test/java/com/alibaba/fescar/discovery/loadbalance/LoadBalanceFactoryTest.java
index 93cc12a6a..5a7d00eb4 100644
--- a/discover/src/test/java/com/alibaba/fescar/discover/loadbalance/LoadBalanceFactoryTest.java
+++ b/discovery/src/test/java/com/alibaba/fescar/discovery/loadbalance/LoadBalanceFactoryTest.java
@@ -14,14 +14,14 @@
  *  limitations under the License.
  */
 
-package com.alibaba.fescar.discover.loadbalance;
+package com.alibaba.fescar.discovery.loadbalance;
 
 import java.net.InetSocketAddress;
 import java.util.ArrayList;
 import java.util.List;
 
-import com.alibaba.fescar.discover.registry.RegistryFactory;
-import com.alibaba.fescar.discover.registry.RegistryService;
+import com.alibaba.fescar.discovery.registry.RegistryFactory;
+import com.alibaba.fescar.discovery.registry.RegistryService;
 
 import org.junit.Assert;
 import org.junit.Ignore;