diff --git a/.gitignore b/.gitignore index 674db64..ffc6ed1 100644 --- a/.gitignore +++ b/.gitignore @@ -79,7 +79,7 @@ local.properties .classpath # Annotation Processing -.apt_generated +.apt_generated* .sts4-cache/ @@ -202,4 +202,4 @@ README.html raftdata -screenlog.* \ No newline at end of file +screenlog.* diff --git a/assembly.xml b/assembly.xml index d0a0aa8..e1c5d6e 100644 --- a/assembly.xml +++ b/assembly.xml @@ -13,25 +13,25 @@ runtime + + + + - unix - 0755 - - bin/** - config/** - - - **/src/** - **/target/** - **/.*/** - + 0664 + ${project.build.directory} + + + *.jar + + - lib/ + ${project.directory} false diff --git a/pom.xml b/pom.xml index b6954ae..c0e9190 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 3.12.11 2.1.0 1.30 - + 1.2.11 1.0.4 @@ -53,13 +53,13 @@ ch.qos.logback logback-classic - 1.2.11 + ${logback.version} ch.qos.logback logback-core - 1.2.11 + ${logback.version} @@ -67,27 +67,6 @@ slf4j-api ${slf4j.version} - - - - - - - - - - - - - @@ -227,66 +206,63 @@ 1.6.2 - - + org.apache.maven.plugins maven-jar-plugin + true + lib/ com.yuandian.dataflow.Server - + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + prepare-package + + copy-dependencies + + + false + false + true + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins maven-assembly-plugin make-assembly - package + assembly single + false + + + com.yuandian.dataflow.Server + + assembly.xml @@ -294,29 +270,7 @@ - - + diff --git a/restart.sh b/restart.sh new file mode 100755 index 0000000..3bb4f6e --- /dev/null +++ b/restart.sh @@ -0,0 +1,2 @@ +#! /bin/bash +sh stop.sh & rm raftdata/ -rf && mvn -T4 package && truncate -s 0 screenlog.0 && sh start.sh diff --git a/start.sh b/start.sh index 366b3f1..2b4c76e 100755 --- a/start.sh +++ b/start.sh @@ -1,15 +1,16 @@ +#! /bin/bash screen -S raft-0 -X quit screen -S raft-1 -X quit screen -S raft-2 -X quit -version=1.0.0-SNAPSHOT +VERSION=1.0.0-SNAPSHOT sleep 1 -screen -dmS raft-0 -L java -cp target/dataflow-${version}.jar-bin/lib/*jar -jar target/dataflow-${version}.jar 0 -screen -dmS raft-1 -L java -cp target/dataflow-${version}.jar-bin/lib/*jar -jar target/dataflow-${version}.jar 1 -screen -dmS raft-2 -L java -cp target/dataflow-${version}.jar-bin/lib/*jar -jar target/dataflow-${version}.jar 2 +screen -dmS raft-0 -L java -jar target/dataflow-${VERSION}.jar 0 +screen -dmS raft-1 -L java -jar target/dataflow-${VERSION}.jar 1 +screen -dmS raft-2 -L java -jar target/dataflow-${VERSION}.jar 2 sleep 1 diff --git a/stop.sh b/stop.sh index e34e95a..12f7ef1 100755 --- a/stop.sh +++ b/stop.sh @@ -1,3 +1,4 @@ +#! /bin/bash screen -S raft-0 -X quit screen -S raft-1 -X quit screen -S raft-2 -X quit