diff --git a/common/pom.xml b/common/pom.xml
index 17ce991..09a4013 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -10,6 +10,7 @@
common
+ jar
@@ -30,11 +31,6 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.11.0
-
- 21
- 21
-
diff --git a/deploy.sh b/deploy.sh
index 2a12c8b..d850d7e 100644
--- a/deploy.sh
+++ b/deploy.sh
@@ -28,7 +28,7 @@ if [ $? -ne 0 ]; then
fi
# 进入工作目录
-cd $WORK_DIR
+cd "$WORK_DIR" || { echo "无法进入工作目录"; exit 1; }
# 打包各个模块
echo "正在打包各个模块..."
@@ -58,6 +58,10 @@ if [ $? -ne 0 ]; then
exit 1
fi
+# 清理旧部署文件
+echo "清理旧部署文件..."
+rm -f "$DEPLOY_DIR/lark.jar" "$DEPLOY_DIR/movie.jar" "$DEPLOY_DIR/weather.jar"
+
# 复制jar包到部署目录
echo "复制jar包到部署目录..."
cp movie/target/movie-*.jar $DEPLOY_DIR/movie.jar
diff --git a/lark/pom.xml b/lark/pom.xml
index d56ab23..45d6d1c 100644
--- a/lark/pom.xml
+++ b/lark/pom.xml
@@ -12,6 +12,13 @@
lark
+
+ cn.hezhaohui
+ common
+ 1.0.0
+ compile
+
+
org.springframework.boot
spring-boot-starter-web
@@ -38,13 +45,6 @@
org.projectlombok
lombok
-
-
- cn.hezhaohui
- common
- 1.0.0
- compile
-
@@ -60,7 +60,6 @@
spring-boot-maven-plugin
cn.hezhaohui.lark.LarkApplication
- true
diff --git a/movie/pom.xml b/movie/pom.xml
index 8b71f50..1fa87f3 100644
--- a/movie/pom.xml
+++ b/movie/pom.xml
@@ -12,6 +12,12 @@
movie
+
+ cn.hezhaohui
+ common
+ 1.0.0
+
+
org.springframework.boot
spring-boot-starter-web
@@ -24,11 +30,7 @@
com.mysql
mysql-connector-j
-
- cn.hezhaohui
- common
- 1.0.0
-
+
org.projectlombok
lombok
@@ -52,7 +54,6 @@
spring-boot-maven-plugin
cn.hezhaohui.movie.MovieApplication
- true
diff --git a/pom.xml b/pom.xml
index e21a59f..9ac58bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,14 +53,33 @@
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- 3.2.2
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.13.0
+
+ 21
+ 21
+ utf-8
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 3.2.2
+
+
+
+ repackage
+
+
+
+
+
+
diff --git a/weather/pom.xml b/weather/pom.xml
index 8885f54..aac67e6 100644
--- a/weather/pom.xml
+++ b/weather/pom.xml
@@ -12,6 +12,12 @@
weather
+
+ cn.hezhaohui
+ common
+ 1.0.0
+
+
org.springframework.boot
spring-boot-starter-web
@@ -33,11 +39,7 @@
hutool-all
5.8.27
-
- cn.hezhaohui
- common
- 1.0.0
-
+
org.springframework.boot
spring-boot-starter-test
@@ -57,7 +59,6 @@
spring-boot-maven-plugin
cn.hezhaohui.weather.WeatherApplication
- true