-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_executable.bat
More file actions
43 lines (38 loc) · 1.18 KB
/
build_executable.bat
File metadata and controls
43 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@echo off
echo ========================================================
echo Building Microservice Manager Single Executable
echo ========================================================
echo.
echo [1/3] Building Frontend...
cd frontend
call npm install
call npm run build
if %ERRORLEVEL% neq 0 (
echo Frontend build failed!
exit /b %ERRORLEVEL%
)
echo.
echo [2/3] Copying Frontend files to Backend static directory...
cd ..
rem Clear existing static files completely
if exist backend\src\main\resources\static rmdir /s /q backend\src\main\resources\static
mkdir backend\src\main\resources\static
rem Copy new built files
xcopy /s /y /i frontend\dist\* backend\src\main\resources\static\
echo.
echo [3/3] Building Backend Executable (Fat JAR)...
cd backend
call mvn clean package -DskipTests
if %ERRORLEVEL% neq 0 (
echo Backend build failed!
exit /b %ERRORLEVEL%
)
cd ..
echo.
echo ========================================================
echo Build Complete!
echo You can run the application by double clicking the JAR file
echo or running the following command:
echo java -jar backend\target\manager-0.0.1-SNAPSHOT.jar
echo ========================================================
pause