You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.8 KiB
63 lines
1.8 KiB
@echo off
|
|
chcp 65001 >nul
|
|
echo ============================================================================
|
|
echo 本地 GUI 打包测试
|
|
echo ============================================================================
|
|
echo.
|
|
|
|
set JAVA_HOME=E:\2025-2026\GitAIOps\jdk
|
|
set PATH=%JAVA_HOME%\bin;%PATH%
|
|
|
|
echo [1/3] 清理旧的构建...
|
|
if exist target\smart-library-management-system-1.0-SNAPSHOT.jar (
|
|
del /Q target\smart-library-management-system-1.0-SNAPSHOT.jar
|
|
)
|
|
if exist target\libs (
|
|
rmdir /S /Q target\libs
|
|
)
|
|
echo ✓ 清理完成
|
|
echo.
|
|
|
|
echo [2/3] 执行 GUI 打包...
|
|
call mvn package -Pgui -DskipTests "-Dmaven.compiler.skip=true" -q
|
|
if %errorlevel% neq 0 (
|
|
echo ✗ GUI 打包失败!
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo ✓ GUI 打包成功
|
|
echo.
|
|
|
|
echo [3/3] 验证生成的文件...
|
|
echo.
|
|
if exist target\smart-library-management-system-1.0-SNAPSHOT.jar (
|
|
echo ✓ GUI JAR: target\smart-library-management-system-1.0-SNAPSHOT.jar
|
|
for %%F in (target\smart-library-management-system-1.0-SNAPSHOT.jar) do echo 大小: %%~zF 字节
|
|
) else (
|
|
echo ✗ GUI JAR 未找到
|
|
)
|
|
|
|
if exist target\libs (
|
|
echo ✓ libs 目录: target\libs
|
|
for /f %%A in ('dir /b target\libs ^| find /c /v ""') do echo 文件数: %%A
|
|
) else (
|
|
echo ✗ libs 目录未找到
|
|
)
|
|
|
|
if exist library.db (
|
|
echo ✓ 数据库: library.db
|
|
) else (
|
|
echo ⚠️ 数据库文件未找到
|
|
)
|
|
|
|
echo.
|
|
echo ============================================================================
|
|
echo 测试完成!
|
|
echo ============================================================================
|
|
echo.
|
|
echo 运行 GUI 应用:
|
|
echo 方式1: java -jar target\smart-library-management-system-1.0-SNAPSHOT.jar
|
|
echo 方式2: java --module-path target\libs --add-modules javafx.controls,javafx.fxml -jar target\smart-library-management-system-1.0-SNAPSHOT.jar
|
|
echo.
|
|
pause
|