mirror of
https://github.com/xoo0524tw/OpenArcadeGames.git
synced 2026-12-06 02:46:01 +02:00
Initial ArcadeGames source and build setup
This commit is contained in:
commit
76ac0e3acd
1069 files changed
+97958
No files matched your search
@@ -0,0 +1,19 @@
|
||||
param([Parameter(ValueFromRemainingArguments = $true)][string[]]$MavenArguments = @('verify'))
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$mavenCommand = Get-Command mvn.cmd -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if ($mavenCommand) {
|
||||
$mavenExecutable = $mavenCommand.Source
|
||||
} else {
|
||||
$ideaMaven = Join-Path $env:LOCALAPPDATA 'Programs/IntelliJ IDEA/plugins/maven-plugin/lib/maven3/bin/mvn.cmd'
|
||||
if (-not (Test-Path -LiteralPath $ideaMaven)) {
|
||||
throw '請將 Maven 加入 PATH,或使用 IntelliJ IDEA 的 Maven 面板執行 verify。'
|
||||
}
|
||||
$mavenExecutable = $ideaMaven
|
||||
}
|
||||
Push-Location $PSScriptRoot
|
||||
try {
|
||||
& $mavenExecutable @MavenArguments
|
||||
if ($LASTEXITCODE -ne 0) { throw "Maven 建置失敗(exit=$LASTEXITCODE)。" }
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
Reference in new issue
Block a user