change package
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ehlxr 2021-01-22 15:40:02 +08:00
parent d0d9a5b7ce
commit 461db897b2
29 changed files with 106 additions and 102 deletions

View File

@ -3,9 +3,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>did</artifactId>
<groupId>cn.ceres.did</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>did-parent</artifactId>
<groupId>io.github.ehlxr</groupId>
<version>1.0.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -1,4 +1,4 @@
package cn.ceres.did.common;
package io.github.ehlxr.did.common;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package cn.ceres.did.common;
package io.github.ehlxr.did.common;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;

View File

@ -1,4 +1,4 @@
package cn.ceres.did.common;
package io.github.ehlxr.did.common;
import java.util.concurrent.atomic.AtomicInteger;

View File

@ -3,9 +3,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>did</artifactId>
<groupId>cn.ceres.did</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>did-parent</artifactId>
<groupId>io.github.ehlxr</groupId>
<version>1.0.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -14,9 +14,8 @@
<name>did-sdk</name>
<dependencies>
<dependency>
<groupId>cn.ceres.did</groupId>
<groupId>io.github.ehlxr</groupId>
<artifactId>did-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@ -34,7 +33,7 @@
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
<includes>
<include>cn.ceres.did:did-common</include>
<include>io.github.ehlxr.did:did-common</include>
</includes>
</artifactSet>
</configuration>

View File

@ -1,8 +1,8 @@
package cn.ceres.did.client;
package io.github.ehlxr.did.client;
import cn.ceres.did.common.Constants;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.common.Constants;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.common.SdkProto;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;

View File

@ -1,7 +1,7 @@
package cn.ceres.did.client;
package io.github.ehlxr.did.client;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.common.SdkProto;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

View File

@ -1,4 +1,4 @@
package cn.ceres.did.client;
package io.github.ehlxr.did.client;
/**
* @author ehlxr

View File

@ -1,6 +1,6 @@
package cn.ceres.did.client;
package io.github.ehlxr.did.client;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.common.SdkProto;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Semaphore;

View File

@ -1,9 +1,9 @@
package cn.ceres.did.client;
package io.github.ehlxr.did.client;
import cn.ceres.did.client.handler.SdkClientDecoder;
import cn.ceres.did.client.handler.SdkClientEncoder;
import cn.ceres.did.client.handler.SdkClientHandler;
import cn.ceres.did.common.Constants;
import io.github.ehlxr.did.client.handler.SdkClientDecoder;
import io.github.ehlxr.did.client.handler.SdkClientEncoder;
import io.github.ehlxr.did.client.handler.SdkClientHandler;
import io.github.ehlxr.did.common.Constants;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;

View File

@ -22,10 +22,10 @@
* THE SOFTWARE.
*/
package cn.ceres.did.client.handler;
package io.github.ehlxr.did.client.handler;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.common.SdkProto;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

View File

@ -22,11 +22,11 @@
* THE SOFTWARE.
*/
package cn.ceres.did.client.handler;
package io.github.ehlxr.did.client.handler;
import cn.ceres.did.client.SdkClient;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.client.SdkClient;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.common.SdkProto;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

View File

@ -22,12 +22,12 @@
* THE SOFTWARE.
*/
package cn.ceres.did.client.handler;
package io.github.ehlxr.did.client.handler;
import cn.ceres.did.client.Client;
import cn.ceres.did.client.ResponseFuture;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.client.Client;
import io.github.ehlxr.did.client.ResponseFuture;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.common.SdkProto;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.slf4j.Logger;

View File

@ -1,6 +1,6 @@
package cn.ceres.did;
package io.github.ehlxr.did;
import cn.ceres.did.client.SdkClient;
import io.github.ehlxr.did.client.SdkClient;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,7 +1,7 @@
package cn.ceres.did;
package io.github.ehlxr.did;
import cn.ceres.did.client.SdkClient;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.client.SdkClient;
import io.github.ehlxr.did.common.SdkProto;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

View File

@ -3,9 +3,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>did</artifactId>
<groupId>cn.ceres.did</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>did-parent</artifactId>
<groupId>io.github.ehlxr</groupId>
<version>1.0.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -15,9 +15,8 @@
<dependencies>
<dependency>
<groupId>cn.ceres.did</groupId>
<groupId>io.github.ehlxr</groupId>
<artifactId>did-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
@ -32,7 +31,7 @@
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>cn.ceres.did.ServerStarter</mainClass>
<mainClass>io.github.ehlxr.did.ServerStarter</mainClass>
</transformer>
</transformers>
</configuration>

View File

@ -1,10 +1,10 @@
package cn.ceres.did;
package io.github.ehlxr.did;
import cn.ceres.did.common.Constants;
import cn.ceres.did.core.SnowFlake;
import cn.ceres.did.server.Server;
import cn.ceres.did.server.http.HttpServer;
import cn.ceres.did.server.sdk.SdkServer;
import io.github.ehlxr.did.common.Constants;
import io.github.ehlxr.did.core.SnowFlake;
import io.github.ehlxr.did.server.Server;
import io.github.ehlxr.did.server.http.HttpServer;
import io.github.ehlxr.did.server.sdk.SdkServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package cn.ceres.did.core;
package io.github.ehlxr.did.core;
/**
* twitter snowflake 算法 -- java 实现

View File

@ -1,6 +1,6 @@
package cn.ceres.did.server;
package io.github.ehlxr.did.server;
import cn.ceres.did.core.SnowFlake;
import io.github.ehlxr.did.core.SnowFlake;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.DefaultEventLoopGroup;

View File

@ -1,4 +1,4 @@
package cn.ceres.did.server;
package io.github.ehlxr.did.server;
/**
* @author ehlxr

View File

@ -1,8 +1,8 @@
package cn.ceres.did.server.http;
package io.github.ehlxr.did.server.http;
import cn.ceres.did.common.Constants;
import cn.ceres.did.core.SnowFlake;
import cn.ceres.did.server.BaseServer;
import io.github.ehlxr.did.common.Constants;
import io.github.ehlxr.did.core.SnowFlake;
import io.github.ehlxr.did.server.BaseServer;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.socket.SocketChannel;

View File

@ -1,8 +1,8 @@
package cn.ceres.did.server.http;
package io.github.ehlxr.did.server.http;
import cn.ceres.did.common.Constants;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.core.SnowFlake;
import io.github.ehlxr.did.common.Constants;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.core.SnowFlake;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;

View File

@ -1,8 +1,8 @@
package cn.ceres.did.server.sdk;
package io.github.ehlxr.did.server.sdk;
import cn.ceres.did.common.Constants;
import cn.ceres.did.core.SnowFlake;
import cn.ceres.did.server.BaseServer;
import io.github.ehlxr.did.common.Constants;
import io.github.ehlxr.did.core.SnowFlake;
import io.github.ehlxr.did.server.BaseServer;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.socket.SocketChannel;

View File

@ -1,7 +1,7 @@
package cn.ceres.did.server.sdk;
package io.github.ehlxr.did.server.sdk;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.common.SdkProto;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

View File

@ -1,7 +1,7 @@
package cn.ceres.did.server.sdk;
package io.github.ehlxr.did.server.sdk;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.common.SdkProto;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.common.SdkProto;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

View File

@ -1,9 +1,9 @@
package cn.ceres.did.server.sdk;
package io.github.ehlxr.did.server.sdk;
import cn.ceres.did.common.Constants;
import cn.ceres.did.common.NettyUtil;
import cn.ceres.did.common.SdkProto;
import cn.ceres.did.core.SnowFlake;
import io.github.ehlxr.did.common.Constants;
import io.github.ehlxr.did.common.NettyUtil;
import io.github.ehlxr.did.common.SdkProto;
import io.github.ehlxr.did.core.SnowFlake;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;

View File

@ -3,7 +3,7 @@
set -e
echo "############## start ##############"
BUILD_DATE=`date +%Y-%m-%d:%H:%M:%S`
BUILD_DATE=$(date +%Y-%m-%d:%H:%M:%S)
#CURR_DIR=`basename $PWD`
#if [[ ${CURR_DIR} != "docker" ]]; then
@ -18,7 +18,7 @@ SERVER_NAME=${MODULE_PARMS}
SERVER_JAR=$PWD/${MODULE_PARMS}/target/${SERVER_NAME}*.jar
#if [ ! -n "ls ${SERVER_JAR} >/dev/null 2>&1" ]; then
if [[ "`echo ${SERVER_JAR}`" != "${SERVER_JAR}" ]]; then
if [[ "$(echo ${SERVER_JAR})" != "${SERVER_JAR}" ]]; then
echo exist ${SERVER_JAR} skip maven build.
else
mvn clean install -DskipTests
@ -32,7 +32,7 @@ if [[ ${DOCKER_IMAGE_TAG} ]];then
else
echo "############## DOCKER_IMAGE_TAG is null ! ##############"
# image_tag=$(git symbolic-ref --short -q HEAD)
image_tag=`date "+%Y%m%d_%H%M%S"`
image_tag=$(date "+%Y%m%d_%H%M%S")
fi
echo "############## image_tag is: ${image_tag} ##############"

View File

@ -14,7 +14,7 @@ if [[ ! -d ${GC_LOGS_DIR} ]]; then
fi
STDOUT_FILE=${LOGS_DIR}/${SERVER_NAME}.log
CURRENT=`date "+%Y%m%d%H%M%S"`
CURRENT=$(date "+%Y%m%d%H%M%S")
#JAVA_OPTS=" -Duser.timezone=\"Asia/Shanghai\" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF8"

14
pom.xml
View File

@ -4,17 +4,17 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.ceres.did</groupId>
<artifactId>did</artifactId>
<groupId>io.github.ehlxr</groupId>
<artifactId>did-parent</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0.2-SNAPSHOT</version>
<modules>
<module>did-server</module>
<module>did-sdk</module>
<module>did-common</module>
</modules>
<name>did</name>
<name>did-parent</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -22,6 +22,7 @@
<!--目标编译的 Java 版本可以通过以下属性指定,不用配置 maven-compiler-plugin 插件-->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<did.version>1.0.2-SNAPSHOT</did.version>
<netty.version>4.1.58.Final</netty.version>
<logback.version>1.1.7</logback.version>
@ -46,6 +47,11 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.ehlxr</groupId>
<artifactId>did-common</artifactId>
<version>${did.version}</version>
</dependency>
</dependencies>
</dependencyManagement>