Archived
16 lines
510 B
PowerShell
16 lines
510 B
PowerShell
Write-Host "===== 开始构建 gmp-mock-service =====" -ForegroundColor Cyan
|
|
|
|
mvn clean package -DskipTests
|
|
|
|
if ($LASTEXITCODE -eq 0) {
|
|
Write-Host "===== 构建成功 =====" -ForegroundColor Green
|
|
$jarPath = "target\gmp-mock-service.jar"
|
|
if (Test-Path $jarPath) {
|
|
$size = [math]::Round((Get-Item $jarPath).Length / 1MB, 2)
|
|
Write-Host "JAR 文件: $jarPath ($size MB)" -ForegroundColor Green
|
|
}
|
|
} else {
|
|
Write-Host "===== 构建失败 =====" -ForegroundColor Red
|
|
exit 1
|
|
}
|