# PowerShell script to sync arm_am-pom and asset-gui projects from SVN # Configuration $SVN_BASE_URL = "https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-BES-JB8_B2024_2" $SVN_BASE_URL_BW2_LIB = "https://svn.armundia.com/svn/PRJbw2/branches/LIB-JK10" # Define workspace directory $WORKSPACE_DIR = Join-Path $PSScriptRoot "workspace" # Define projects and their SVN URLs $PROJECTS = @{ "arm_am-pom" = $SVN_BASE_URL "asset-gui" = "$SVN_BASE_URL/asset-gui" } # Create workspace directory if it doesn't exist if (-not (Test-Path $WORKSPACE_DIR)) { New-Item -ItemType Directory -Path $WORKSPACE_DIR -Force } # Function to sync a project from SVN function Sync-Project { param ( [string]$projectName, [string]$svnUrl, [string]$targetDir ) $projectPath = Join-Path $targetDir $projectName if (Test-Path $projectPath) { Write-Host "Updating $projectName..." -ForegroundColor Yellow Set-Location $projectPath svn update } else { Write-Host "Checking out $projectName..." -ForegroundColor Yellow Set-Location $targetDir svn checkout $svnUrl $projectName } if ($LASTEXITCODE -eq 0) { Write-Host "$projectName successfully synced" -ForegroundColor Green } else { Write-Host "Error syncing $projectName" -ForegroundColor Red } } # Store the original directory $originalDirectory = Get-Location try { # Sync each project foreach ($project in $PROJECTS.GetEnumerator()) { Sync-Project -projectName $project.Key -svnUrl $project.Value -targetDir $WORKSPACE_DIR } # Array of projects to build in order $BUILD_ORDER = @( # Base libraries "shared-javaEE", # Base Java EE utilities "arm-core-utility", # core utilities "arm-core-utility-extra", # additional utilities "arm-util", # general utilities # Core functionality "arm-core-document", # Document handling "arm-core-event", # Event system "arm-core-users", # User management "arm-core-querybuilder", # Query building "arm-core-print", # Printing system # Business modules "arm-core-quest", # Questionnaires "arm-core-batch", # Batch processing "arm-core-perfo", # Performance "arm-core-var", # Risk calculation "arm-fileExporter", # File export "arm-limiti", # Limits management "arm-quadratore-portafogli", # Portfolio management # Additional components "data-quality", # Data quality "AmazonAWS.S3" # AWS S3 integration ) } finally { # Restore original directory Set-Location $originalDirectory }