初始化项目代码
This commit is contained in:
27
build.bat
Normal file
27
build.bat
Normal file
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
set JAVA_HOME=C:\Program Files\Java\jdk-21.0.8
|
||||
set PATH=%JAVA_HOME%\bin;%PATH%
|
||||
|
||||
echo Starting Maven build...
|
||||
echo JAVA_HOME=%JAVA_HOME%
|
||||
echo PATH=%PATH%
|
||||
|
||||
:: Check if maven wrapper properties exist
|
||||
if not exist ".mvn\wrapper\maven-wrapper.properties" (
|
||||
echo ERROR: .mvn\wrapper\maven-wrapper.properties not found!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Try to run maven directly
|
||||
echo Running: mvn clean package -DskipTests
|
||||
mvn clean package -DskipTests
|
||||
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo Build successful!
|
||||
echo JAR file should be in target/ directory
|
||||
) else (
|
||||
echo Build failed with error code %ERRORLEVEL%
|
||||
)
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user