working project
This commit is contained in:
42
Build.bat
42
Build.bat
@@ -1,24 +1,40 @@
|
||||
@echo off
|
||||
echo === Building RadioDJ-TunaBridge ===
|
||||
echo.
|
||||
echo === 🚀 Building RadioDJ-TunaBridge with Java 17 ===
|
||||
echo.
|
||||
|
||||
REM Clean previous build
|
||||
REM Manually set Java 17 location
|
||||
set "JAVA_HOME=C:\java_runtime\17"
|
||||
set "PATH=%JAVA_HOME%\bin;%PATH%"
|
||||
|
||||
REM Step 1: Clean project
|
||||
echo 🧹 Cleaning...
|
||||
mvn clean
|
||||
|
||||
REM Compile and package the JAR
|
||||
mvn package
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo ❌ Build failed.
|
||||
echo ❌ Maven clean failed.
|
||||
pause
|
||||
exit /b %ERRORLEVEL%
|
||||
)
|
||||
|
||||
REM Copy final JAR to top-level folder (optional)
|
||||
IF EXIST target\radiodj-tuna-bridge-1.0-SNAPSHOT.jar (
|
||||
copy target\radiodj-tuna-bridge-1.0-SNAPSHOT.jar radiodj-tuna-bridge.jar >nul
|
||||
echo ✅ Build complete. Output: radiodj-tuna-bridge.jar
|
||||
) ELSE (
|
||||
echo ❌ JAR not found!
|
||||
REM Step 2: Compile and package
|
||||
echo 🔨 Compiling...
|
||||
mvn package
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo ❌ Maven build failed.
|
||||
pause
|
||||
exit /b %ERRORLEVEL%
|
||||
)
|
||||
|
||||
REM Step 3: Copy JAR to top level
|
||||
set "TARGET_JAR=target\radiodj-tuna-bridge-1.0-SNAPSHOT.jar"
|
||||
set "OUTPUT_JAR=radiodj-tuna-bridge.jar"
|
||||
|
||||
IF EXIST "%TARGET_JAR%" (
|
||||
copy "%TARGET_JAR%" "%OUTPUT_JAR%" >nul
|
||||
echo ✅ JAR ready: %OUTPUT_JAR%
|
||||
) ELSE (
|
||||
echo ❌ No JAR found in target folder.
|
||||
)
|
||||
|
||||
echo.
|
||||
pause
|
Reference in New Issue
Block a user