From f64693c0da5483d8670220bf3a5bf89a32e94a20 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期五, 07 十一月 2025 10:34:21 +0800
Subject: [PATCH] 解决线上打包问题

---
 backend/pom.xml |   31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/backend/pom.xml b/backend/pom.xml
index dfcd6f6..03c7bc5 100644
--- a/backend/pom.xml
+++ b/backend/pom.xml
@@ -168,15 +168,15 @@
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <configuration>
                     <!-- 鐢熸垚鍙墽琛岀殑鑳栧寘锛屼究浜庢湰鍦扮洿鎺ヨ繍琛� -->
-                    <skip>false</skip>
+                    <skip>true</skip>
                 </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
+<!--                <executions>-->
+<!--                    <execution>-->
+<!--                        <goals>-->
+<!--                            <goal>repackage</goal>-->
+<!--                        </goals>-->
+<!--                    </execution>-->
+<!--                </executions>-->
             </plugin>
 
             <!-- 鍦ㄦ墦鍖呴樁娈靛鍒舵墍鏈変緷璧栧埌 target/lib -->
@@ -203,6 +203,21 @@
             </plugin>
 
             <!-- 浣跨敤 Spring Boot repackage 鐢熸垚鍙墽琛岃儢鍖咃紝绉婚櫎鑷畾涔� Jar 娓呭崟浠ラ伩鍏嶅啿绐� -->
+            <!-- 鐢熸垚鍙墽琛岀槮 JAR锛氬啓鍏� Main-Class 涓� Class-Path 鎸囧悜 lib/ -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>3.4.2</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <mainClass>com.rongyichuang.RycBackendApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file

--
Gitblit v1.8.0