初始化系统融合软件代码仓库

This commit is contained in:
2026-10-20 08:34:12 +08:00
commit 587ae6f088
96 changed files with 10230 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
[CmdletBinding()]
param([string]$JavaHome, [string]$MavenPath, [string]$NodePath, [switch]$SkipFrontend)
. (Join-Path $PSScriptRoot 'Common.ps1')
$projectRoot = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
$java = Get-XtrhJava -JavaHome $JavaHome
$env:JAVA_HOME = Split-Path -Parent (Split-Path -Parent $java)
if (-not $MavenPath) {
$maven = Get-Command mvn.cmd -ErrorAction SilentlyContinue
if ($maven) { $MavenPath = $maven.Source }
}
if (-not $MavenPath -or -not (Test-Path -LiteralPath $MavenPath)) { throw '请通过 -MavenPath 指定 mvn.cmd,或将 Maven 加入 PATH。' }
if (-not $SkipFrontend) { & (Join-Path $PSScriptRoot 'Build-Console.ps1') -NodePath $NodePath }
Push-Location $projectRoot
try {
& $MavenPath '-B' 'verify'
if ($LASTEXITCODE -ne 0) { throw 'Java 构建或测试失败。' }
} finally { Pop-Location }
Write-Output ('构建完成:' + (Join-Path $projectRoot 'target/xtrh-services-1.0.0.jar'))