File tree 24 files changed +44
-74
lines changed
24 files changed +44
-74
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
66
66
<!-- Pack the startup jar in the target directory to the directory-->
67
67
<fileSet >
68
68
<directory >target</directory >
69
- <outputDirectory >/lib </outputDirectory >
69
+ <outputDirectory >/</outputDirectory >
70
70
<includes >
71
71
<include >*.jar</include >
72
72
</includes >
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
66
66
<!-- Pack the startup jar in the target directory to the directory-->
67
67
<fileSet >
68
68
<directory >target</directory >
69
- <outputDirectory >/lib </outputDirectory >
69
+ <outputDirectory >/</outputDirectory >
70
70
<includes >
71
71
<include >*.jar</include >
72
72
</includes >
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
66
66
<!-- Pack the startup jar in the target directory to the directory-->
67
67
<fileSet >
68
68
<directory >target</directory >
69
- <outputDirectory >/lib </outputDirectory >
69
+ <outputDirectory >/</outputDirectory >
70
70
<includes >
71
71
<include >*.jar</include >
72
72
</includes >
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
66
66
<!-- Pack the startup jar in the target directory to the directory-->
67
67
<fileSet >
68
68
<directory >target</directory >
69
- <outputDirectory >/lib </outputDirectory >
69
+ <outputDirectory >/</outputDirectory >
70
70
<includes >
71
71
<include >*.jar</include >
72
72
</includes >
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
66
66
<!-- Pack the startup jar in the target directory to the directory-->
67
67
<fileSet >
68
68
<directory >target</directory >
69
- <outputDirectory >/lib </outputDirectory >
69
+ <outputDirectory >/</outputDirectory >
70
70
<includes >
71
71
<include >*.jar</include >
72
72
</includes >
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
66
66
<!-- Pack the startup jar in the target directory to the directory-->
67
67
<fileSet >
68
68
<directory >target</directory >
69
- <outputDirectory >/lib </outputDirectory >
69
+ <outputDirectory >/</outputDirectory >
70
70
<includes >
71
71
<include >*.jar</include >
72
72
</includes >
Original file line number Diff line number Diff line change 17
17
# limitations under the License.
18
18
19
19
# project name
20
- SERVER_NAME=" hertzbeat-collector "
20
+ SERVER_NAME=" ${project.build.finalName} "
21
21
22
22
# jar name
23
- # JAR_NAME="${project.build.finalName}.jar"
23
+ JAR_NAME=" ${project.build.finalName} .jar"
24
24
25
25
# cd bin
26
26
cd ` dirname $0 `
@@ -34,10 +34,8 @@ DEPLOY_DIR=`pwd`
34
34
# config dir
35
35
CONF_DIR=$DEPLOY_DIR /config
36
36
MAIN_CLASS=" org.apache.hertzbeat.collector.Collector"
37
- LIB_PATH=" $DEPLOY_DIR /lib"
38
37
EXT_LIB_PATH=" $DEPLOY_DIR /ext-lib"
39
- TARGET_LIB_PATH=" $DEPLOY_DIR /target"
40
- CLASSPATH=" $LIB_PATH /*:$TARGET_LIB_PATH /*:$EXT_LIB_PATH /*"
38
+ CLASSPATH=" $DEPLOY_DIR /$JAR_NAME :$EXT_LIB_PATH /*"
41
39
# log dir
42
40
LOGS_DIR=$DEPLOY_DIR /logs
43
41
# create logs dir when not exist
Original file line number Diff line number Diff line change 16
16
# See the License for the specific language governing permissions and
17
17
# limitations under the License.
18
18
19
- # cd bin dir
20
- cd ` dirname $0 `
21
- # bin dir
22
- BIN_DIR=` pwd`
23
- # return root dir
24
- cd ..
25
- # root path dir
26
- DEPLOY_DIR=` pwd`
27
-
28
19
# restart start time
29
20
startTime=$( date +%s)
30
21
echo -e " \033[0;31mCurrent Time is:$( date " +%Y-%m-%d %H:%M:%S" ) Restart Now!\033[0m"
31
- $DEPLOY_DIR /bin /shutdown.sh
22
+ . /shutdown.sh
32
23
echo
33
24
sleep 2
34
25
echo
35
- $DEPLOY_DIR /bin /startup.sh
26
+ . /startup.sh
36
27
# restart end time
37
28
endTime=$( date +%s)
38
29
echo -e " \033[0;31mCurrent Time is:$( date " +%Y-%m-%d %H:%M:%S" ) Restart Success!Spend $(( endTime - startTime)) seconds \033[0m" ;
Original file line number Diff line number Diff line change 19
19
@ echo off
20
20
setlocal enabledelayedexpansion
21
21
22
- set SERVER_NAME = " hertzbeat-collector "
22
+ set SERVER_NAME = " ${project.artifactId} "
23
23
24
24
25
25
set SERVER_PORT = 1159
26
26
27
- echo Start shutdown HertzBeat %SERVER_NAME%
27
+ echo Start shutdown HertzBeat %SERVER_NAME%
28
28
29
29
for /f " tokens=1-5" %%i in ('netstat -ano^ |findstr " :%SERVER_PORT% " ') do (
30
30
echo kill the process %%m who use the port
31
31
taskkill /pid %%m -t -f
32
- echo Shutdown HertzBeat %SERVER_NAME% Success!
32
+ echo Shutdown HertzBeat %SERVER_NAME% Success!
33
33
goto q
34
34
)
35
35
echo Failed shutdown HertzBeat %SERVER_NAME%
Original file line number Diff line number Diff line change 16
16
# See the License for the specific language governing permissions and
17
17
# limitations under the License.
18
18
# project name
19
- APPLICATION=" hertzbeat-collector "
19
+ APPLICATION=" ${project.artifactId} "
20
20
21
21
# jar file name
22
- APPLICATION_JAR=" hertzbeat.collector "
22
+ APPLICATION_JAR=" ${project.build.finalName} .jar "
23
23
24
24
# find the service pid, kill -9 pid
25
25
PID=$( ps -ef | grep java | grep " ${APPLICATION_JAR} " | grep -v grep | awk ' { print $2 }' )
Original file line number Diff line number Diff line change 19
19
@ echo off
20
20
setlocal enabledelayedexpansion
21
21
22
- set SERVER_NAME = " hertzbeat-collector "
22
+ set SERVER_NAME = ${project.artifactId}
23
23
24
- @ REM set JAR_NAME=${project.build.finalName}.jar
24
+ set JAR_NAME = ${project.build.finalName}.jar
25
25
26
26
rem enter the bin directory
27
27
cd /d %~dp0
@@ -43,10 +43,8 @@ for /f "tokens=1-5" %%i in ('netstat -ano^|findstr "0.0.0.0:%SERVER_PORT%"') do
43
43
)
44
44
set MAIN_CLASS = org.apache.hertzbeat.collector.Collector
45
45
set LOGS_DIR = %DEPLOY_DIR% \logs
46
- set LIB_PATH = %DEPLOY_DIR% \lib
47
46
set EXT_LIB_PATH = %DEPLOY_DIR% \ext-lib
48
- set TARGET_LIB_PATH = %DEPLOY_DIR% \target
49
- set CLASSPATH = %LIB_PATH% \*;%TARGET_LIB_PATH% \*;%EXT_LIB_PATH% \*
47
+ set CLASSPATH = %DEPLOY_DIR% \%JAR_NAME% ;%EXT_LIB_PATH% \*
50
48
51
49
if not exist %LOGS_DIR% (
52
50
mkdir %LOGS_DIR%
Original file line number Diff line number Diff line change 17
17
# limitations under the License.
18
18
19
19
# project name
20
- SERVER_NAME=" hertzbeat-collector "
20
+ SERVER_NAME=" ${project.artifactId} "
21
21
22
22
# jar file name
23
- # JAR_NAME="${project.build.finalName}.jar"
23
+ JAR_NAME=" ${project.build.finalName} .jar"
24
24
25
25
# cd bin dir
26
26
cd ` dirname $0 `
@@ -72,10 +72,8 @@ if [ -n "$SERVER_PORT" ]; then
72
72
fi
73
73
fi
74
74
MAIN_CLASS=" org.apache.hertzbeat.collector.Collector"
75
- LIB_PATH=" $DEPLOY_DIR /lib"
76
75
EXT_LIB_PATH=" $DEPLOY_DIR /ext-lib"
77
- TARGET_LIB_PATH=" $DEPLOY_DIR /target"
78
- CLASSPATH=" $LIB_PATH /*:$TARGET_LIB_PATH /*:$EXT_LIB_PATH /*"
76
+ CLASSPATH=" $DEPLOY_DIR /$JAR_NAME :$EXT_LIB_PATH /*"
79
77
# log dir
80
78
LOGS_DIR=$DEPLOY_DIR /logs
81
79
# create logs dir when not exist
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
72
72
<!-- Pack the startup jar in the target directory to the directory-->
73
73
<fileSet >
74
74
<directory >target</directory >
75
- <outputDirectory >/lib </outputDirectory >
75
+ <outputDirectory >/</outputDirectory >
76
76
<includes >
77
77
<include >*.jar</include >
78
78
</includes >
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
72
72
<!-- Pack the startup jar in the target directory to the directory-->
73
73
<fileSet >
74
74
<directory >target</directory >
75
- <outputDirectory >/lib </outputDirectory >
75
+ <outputDirectory >/</outputDirectory >
76
76
<includes >
77
77
<include >*.jar</include >
78
78
</includes >
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
72
72
<!-- Pack the startup jar in the target directory to the directory-->
73
73
<fileSet >
74
74
<directory >target</directory >
75
- <outputDirectory >/lib </outputDirectory >
75
+ <outputDirectory >/</outputDirectory >
76
76
<includes >
77
77
<include >*.jar</include >
78
78
</includes >
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
71
71
<!-- Pack the startup jar in the target directory to the directory-->
72
72
<fileSet >
73
73
<directory >target</directory >
74
- <outputDirectory >/lib </outputDirectory >
74
+ <outputDirectory >/</outputDirectory >
75
75
<includes >
76
76
<include >*.jar</include >
77
77
</includes >
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
72
72
<!-- Pack the startup jar in the target directory to the directory-->
73
73
<fileSet >
74
74
<directory >target</directory >
75
- <outputDirectory >/lib </outputDirectory >
75
+ <outputDirectory >/</outputDirectory >
76
76
<includes >
77
77
<include >*.jar</include >
78
78
</includes >
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ http://maven.apache.org/ASSEMBLY/2.0.0 ">
71
71
<!-- Pack the startup jar in the target directory to the directory-->
72
72
<fileSet >
73
73
<directory >target</directory >
74
- <outputDirectory >/lib </outputDirectory >
74
+ <outputDirectory >/</outputDirectory >
75
75
<includes >
76
76
<include >*.jar</include >
77
77
</includes >
Original file line number Diff line number Diff line change 17
17
# limitations under the License.
18
18
19
19
# project name
20
- SERVER_NAME=" hertzbeat-manager "
20
+ SERVER_NAME=" ${project.build.finalName} "
21
21
22
22
# jar name
23
- # JAR_NAME="${project.build.finalName}.jar"
23
+ JAR_NAME=" ${project.build.finalName} .jar"
24
24
25
25
# cd bin
26
26
cd ` dirname $0 `
@@ -36,10 +36,8 @@ DEPLOY_DIR=`pwd`
36
36
# if a directory is specified, spring will read all configuration files in the directory
37
37
CONF_DIR=$DEPLOY_DIR /config
38
38
MAIN_CLASS=" org.apache.hertzbeat.manager.Manager"
39
- LIB_PATH=" $DEPLOY_DIR /lib"
40
39
EXT_LIB_PATH=" $DEPLOY_DIR /ext-lib"
41
- TARGET_LIB_PATH=" $DEPLOY_DIR /target"
42
- CLASSPATH=" $LIB_PATH /*:$TARGET_LIB_PATH /*:$EXT_LIB_PATH /*"
40
+ CLASSPATH=" $DEPLOY_DIR /$JAR_NAME :$EXT_LIB_PATH /*"
43
41
# log dir
44
42
LOGS_DIR=$DEPLOY_DIR /logs
45
43
# create logs dir when not exist
Original file line number Diff line number Diff line change 16
16
# See the License for the specific language governing permissions and
17
17
# limitations under the License.
18
18
19
- # cd bin dir
20
- cd ` dirname $0 `
21
- # bin dir
22
- BIN_DIR=` pwd`
23
- # return root dir
24
- cd ..
25
- # root path dir
26
- DEPLOY_DIR=` pwd`
27
-
28
19
# restart start time
29
20
startTime=$( date +%s)
30
21
echo -e " \033[0;31mCurrent Time is:$( date " +%Y-%m-%d %H:%M:%S" ) Restart Now!\033[0m"
31
- $DEPLOY_DIR /bin /shutdown.sh
22
+ . /shutdown.sh
32
23
echo
33
24
sleep 2
34
25
echo
35
- $DEPLOY_DIR /bin /startup.sh
26
+ . /startup.sh
36
27
# restart end time
37
28
endTime=$( date +%s)
38
29
echo -e " \033[0;31mCurrent Time is:$( date " +%Y-%m-%d %H:%M:%S" ) Restart Success!Spend $(( endTime - startTime)) seconds \033[0m" ;
Original file line number Diff line number Diff line change 19
19
@ echo off
20
20
setlocal enabledelayedexpansion
21
21
22
- set SERVER_NAME = " hertzbeat-manager "
22
+ set SERVER_NAME = " ${project.artifactId} "
23
23
24
24
25
25
set SERVER_PORT = 1157
26
26
27
- echo Start shutdown HertzBeat %SERVER_NAME%
27
+ echo Start shutdown HertzBeat %SERVER_NAME%
28
28
29
29
for /f " tokens=1-5" %%i in ('netstat -ano^ |findstr " :%SERVER_PORT% " ') do (
30
30
echo kill the process %%m who use the port
31
31
taskkill /pid %%m -t -f
32
- echo Shutdown HertzBeat %SERVER_NAME% Success!
32
+ echo Shutdown HertzBeat %SERVER_NAME% Success!
33
33
goto q
34
34
)
35
35
echo Failed shutdown HertzBeat %SERVER_NAME%
Original file line number Diff line number Diff line change 16
16
# See the License for the specific language governing permissions and
17
17
# limitations under the License.
18
18
# project name
19
- APPLICATION=" hertzbeat-manager "
19
+ APPLICATION=" ${project.artifactId} "
20
20
21
21
# jar file name
22
- APPLICATION_JAR=" hertzbeat.manager "
22
+ APPLICATION_JAR=" ${project.build.finalName} .jar "
23
23
24
24
# find the service pid, kill -9 pid
25
25
PID=$( ps -ef | grep java | grep " ${APPLICATION_JAR} " | grep -v grep | awk ' { print $2 }' )
Original file line number Diff line number Diff line change 19
19
@ echo off
20
20
setlocal enabledelayedexpansion
21
21
22
- set SERVER_NAME = " hertzbeat-manager "
22
+ set SERVER_NAME = ${project.artifactId}
23
23
24
- @ REM set JAR_NAME=${project.build.finalName}.jar
24
+ set JAR_NAME = ${project.build.finalName}.jar
25
25
26
26
rem enter the bin directory
27
27
cd /d %~dp0
@@ -43,10 +43,8 @@ for /f "tokens=1-5" %%i in ('netstat -ano^|findstr "0.0.0.0:%SERVER_PORT%"') do
43
43
)
44
44
set MAIN_CLASS = org.apache.hertzbeat.manager.Manager
45
45
set LOGS_DIR = %DEPLOY_DIR% \logs
46
- set LIB_PATH = %DEPLOY_DIR% \lib
47
46
set EXT_LIB_PATH = %DEPLOY_DIR% \ext-lib
48
- set TARGET_LIB_PATH = %DEPLOY_DIR% \target
49
- set CLASSPATH = %LIB_PATH% \*;%TARGET_LIB_PATH% \*;%EXT_LIB_PATH% \*
47
+ set CLASSPATH = %DEPLOY_DIR% \%JAR_NAME% ;%EXT_LIB_PATH% \*
50
48
51
49
if not exist %LOGS_DIR% (
52
50
mkdir %LOGS_DIR%
Original file line number Diff line number Diff line change 17
17
# limitations under the License.
18
18
19
19
# project name
20
- SERVER_NAME=" hertzbeat-manager "
20
+ SERVER_NAME=" ${project.artifactId} "
21
21
22
22
# jar file name
23
- # JAR_NAME="${project.build.finalName}.jar"
23
+ JAR_NAME=" ${project.build.finalName} .jar"
24
24
25
25
# cd bin dir
26
26
cd ` dirname $0 `
@@ -74,10 +74,8 @@ if [ -n "$SERVER_PORT" ]; then
74
74
fi
75
75
fi
76
76
MAIN_CLASS=" org.apache.hertzbeat.manager.Manager"
77
- LIB_PATH=" $DEPLOY_DIR /lib"
78
77
EXT_LIB_PATH=" $DEPLOY_DIR /ext-lib"
79
- TARGET_LIB_PATH=" $DEPLOY_DIR /target"
80
- CLASSPATH=" $LIB_PATH /*:$TARGET_LIB_PATH /*:$EXT_LIB_PATH /*"
78
+ CLASSPATH=" $DEPLOY_DIR /$JAR_NAME :$EXT_LIB_PATH /*"
81
79
# log dir
82
80
LOGS_DIR=$DEPLOY_DIR /logs
83
81
# create logs dir when not exist
You can’t perform that action at this time.
0 commit comments