-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_and_deploy.bat
More file actions
38 lines (32 loc) · 1.12 KB
/
build_and_deploy.bat
File metadata and controls
38 lines (32 loc) · 1.12 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
@echo off
REM Build and deploy script for Online Shop Management System
echo ===================================================
echo Building the OSMS project with Maven
echo ===================================================
call mvn clean package
if %ERRORLEVEL% NEQ 0 (
echo Build failed!
pause
exit /b %ERRORLEVEL%
)
echo ===================================================
echo Creating uploads directory if it doesn't exist
echo ===================================================
if not exist "C:\apache-tomcat\webapps\osms\uploads" (
mkdir "C:\apache-tomcat\webapps\osms\uploads"
echo Created uploads directory
) else (
echo Uploads directory already exists
)
echo ===================================================
echo Copying WAR file to Tomcat webapps directory
echo ===================================================
copy /Y target\osms.war C:\apache-tomcat\webapps\
echo ===================================================
echo Deployment complete!
echo ===================================================
echo.
echo You can now access the application at:
echo http://localhost:8080/osms/
echo.
pause