21 lines
984 B
PowerShell
21 lines
984 B
PowerShell
# Production build: bundles the React UI into the Quarkus app, packages a runnable jar,
|
|
# then serves everything (UI + API) from a single process on :8090.
|
|
$ErrorActionPreference = "Stop"
|
|
$root = $PSScriptRoot
|
|
$env:JAVA_HOME = "C:\Program Files\Java\jdk-21.0.11"
|
|
$mvn = "C:\Users\Dell\.m2\wrapper\dists\apache-maven-3.9.9-bin\4nf9hui3q3djbarqar9g711ggc\apache-maven-3.9.9\bin\mvn.cmd"
|
|
|
|
Write-Host "[1/3] Building React UI -> src/main/resources/META-INF/resources ..." -ForegroundColor Cyan
|
|
Push-Location "$root\frontend"
|
|
if (-not (Test-Path "node_modules")) { npm install }
|
|
npm run build
|
|
Pop-Location
|
|
|
|
Write-Host "[2/3] Packaging Quarkus app ..." -ForegroundColor Cyan
|
|
Set-Location $root
|
|
& $mvn -q -DskipTests package
|
|
|
|
Write-Host "[3/3] Done. Run it with:" -ForegroundColor Green
|
|
Write-Host ' $env:JAVA_HOME="C:\Program Files\Java\jdk-21.0.11"; java -jar target\quarkus-app\quarkus-run.jar' -ForegroundColor Yellow
|
|
Write-Host "Then open http://localhost:8090" -ForegroundColor Green
|