From 53a209b76ddf2a639abed44038b9ebaf38f9feee Mon Sep 17 00:00:00 2001 From: Zhang Peng Date: Wed, 4 Jul 2018 22:55:47 +0800 Subject: [PATCH] :bookmark: bat script --- demos/scripts/build-javaapp.bat | 9 +++++++++ demos/scripts/demo01-start.bat | 16 ++++++++++++++++ demos/scripts/startup.bat | 2 -- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 demos/scripts/build-javaapp.bat create mode 100644 demos/scripts/demo01-start.bat delete mode 100644 demos/scripts/startup.bat diff --git a/demos/scripts/build-javaapp.bat b/demos/scripts/build-javaapp.bat new file mode 100644 index 0000000..9dbbcfa --- /dev/null +++ b/demos/scripts/build-javaapp.bat @@ -0,0 +1,9 @@ +rem ------------------------------------------------- +rem 本脚本用于编译打包 JavaWebApp +rem 环境要求:Maven + JDK8 +rem ------------------------------------------------- + +@echo off +cd "../javaapp" +mvn clean package -Dmaven.test.skip=true +pause diff --git a/demos/scripts/demo01-start.bat b/demos/scripts/demo01-start.bat new file mode 100644 index 0000000..19f15b9 --- /dev/null +++ b/demos/scripts/demo01-start.bat @@ -0,0 +1,16 @@ +rem ------------------------------------------------- +rem 启动 Demo1 +rem 1. 启动 Nginx +rem 2. 启动一个 JavaApp,访问地址为:localhost:9001 +rem ------------------------------------------------- +@echo off +echo ">>>> 1. Start nginx" +cd "../nginx-1.14.0" +call nginx-start.bat + +echo ">>>> 2. Start javaapp - localhost:9001" +cd "../javaapp" +java -Dtomcat.connector.port=9001 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.app.Main +pause + + diff --git a/demos/scripts/startup.bat b/demos/scripts/startup.bat deleted file mode 100644 index ea18e5b..0000000 --- a/demos/scripts/startup.bat +++ /dev/null @@ -1,2 +0,0 @@ -java -Dtomcat.context.path=/app -Dtomcat.connector.port=8091 -cp "./../target/JavaWebApp/WEB-INF/classes;./../target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.app.Main -pause