@echo off echo Building and Running Chronic Disease App... REM Check if Maven is installed where mvn >nul 2>nul if %errorlevel% neq 0 ( echo Error: Maven is not installed or not in PATH pause exit /b 1 ) echo Cleaning log directory... if exist logs ( rmdir /s /q logs echo Log directory cleared. ) else ( echo No log directory to clear. ) echo Cleaning project... call mvn clean echo Building project... call mvn package if %errorlevel% neq 0 ( echo Error: Build failed pause exit /b 1 ) echo Running application... java -jar target/ChronicDiseaseApp-1.0-SNAPSHOT.jar