change package
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d0d9a5b7ce
commit
461db897b2
|
@ -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>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cn.ceres.did.common;
|
||||
package io.github.ehlxr.did.common;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -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;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.ceres.did.common;
|
||||
package io.github.ehlxr.did.common;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.ceres.did.client;
|
||||
package io.github.ehlxr.did.client;
|
||||
|
||||
/**
|
||||
* @author ehlxr
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.ceres.did.core;
|
||||
package io.github.ehlxr.did.core;
|
||||
|
||||
/**
|
||||
* twitter 的 snowflake 算法 -- java 实现
|
|
@ -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;
|
|
@ -1,4 +1,4 @@
|
|||
package cn.ceres.did.server;
|
||||
package io.github.ehlxr.did.server;
|
||||
|
||||
/**
|
||||
* @author ehlxr
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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,21 +18,21 @@ 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
|
||||
echo exist ${SERVER_JAR} skip maven build.
|
||||
if [[ "$(echo ${SERVER_JAR})" != "${SERVER_JAR}" ]]; then
|
||||
echo exist ${SERVER_JAR} skip maven build.
|
||||
else
|
||||
mvn clean install -DskipTests
|
||||
mvn clean install -DskipTests
|
||||
fi
|
||||
|
||||
cp ${SERVER_JAR} ./docker
|
||||
#cd docker
|
||||
|
||||
if [[ ${DOCKER_IMAGE_TAG} ]];then
|
||||
image_tag=${DOCKER_IMAGE_TAG}
|
||||
if [[ ${DOCKER_IMAGE_TAG} ]]; then
|
||||
image_tag=${DOCKER_IMAGE_TAG}
|
||||
else
|
||||
echo "############## DOCKER_IMAGE_TAG is null ! ##############"
|
||||
# image_tag=$(git symbolic-ref --short -q HEAD)
|
||||
image_tag=`date "+%Y%m%d_%H%M%S"`
|
||||
echo "############## DOCKER_IMAGE_TAG is null ! ##############"
|
||||
# image_tag=$(git symbolic-ref --short -q HEAD)
|
||||
image_tag=$(date "+%Y%m%d_%H%M%S")
|
||||
fi
|
||||
echo "############## image_tag is: ${image_tag} ##############"
|
||||
|
||||
|
@ -50,6 +50,6 @@ echo "############## build & push finish: ${BUILD_DATE} ##############"
|
|||
|
||||
err=$?
|
||||
if [[ "$err" -ne "0" ]]; then
|
||||
echo "############## build error ! ##############"
|
||||
exit 1
|
||||
fi
|
||||
echo "############## build error ! ##############"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -7,14 +7,14 @@ LOGS_DIR="/data/logs"
|
|||
GC_LOGS_DIR="/data/gc"
|
||||
|
||||
if [[ ! -d ${LOGS_DIR} ]]; then
|
||||
mkdir -p ${LOGS_DIR}
|
||||
mkdir -p ${LOGS_DIR}
|
||||
fi
|
||||
if [[ ! -d ${GC_LOGS_DIR} ]]; then
|
||||
mkdir -p ${GC_LOGS_DIR}
|
||||
mkdir -p ${GC_LOGS_DIR}
|
||||
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"
|
||||
|
||||
|
@ -30,4 +30,4 @@ JAVA_MEM_OPTS=" -server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:${GC_
|
|||
echo "Starting the ${SERVER_NAME} ...\c"
|
||||
chmod -R 755 ./${SERVER_NAME}*.jar
|
||||
#java -jar ${JAVA_OPTS} ${JAVA_MEM_OPTS} ./${SERVER_NAME}*.jar > ${STDOUT_FILE} 2>&1
|
||||
java -jar ${JAVA_MEM_OPTS} ./${SERVER_NAME}*.jar | tee -a ${STDOUT_FILE} 2>&1
|
||||
java -jar ${JAVA_MEM_OPTS} ./${SERVER_NAME}*.jar | tee -a ${STDOUT_FILE} 2>&1
|
||||
|
|
14
pom.xml
14
pom.xml
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue