From dc5808b1e366d94d59e6bcc16f11fb69bc53ef49 Mon Sep 17 00:00:00 2001 From: Gaetano Savo Date: Thu, 20 Mar 2025 08:20:53 +0100 Subject: [PATCH] errori nomenclatura --- Sync-Projects.ps1 | 88 ++++++++++++++++++++++++++++++ checkout-projects.ps1 | 124 ------------------------------------------ 2 files changed, 88 insertions(+), 124 deletions(-) create mode 100644 Sync-Projects.ps1 delete mode 100644 checkout-projects.ps1 diff --git a/Sync-Projects.ps1 b/Sync-Projects.ps1 new file mode 100644 index 0000000..843f9d6 --- /dev/null +++ b/Sync-Projects.ps1 @@ -0,0 +1,88 @@ +# 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 +} diff --git a/checkout-projects.ps1 b/checkout-projects.ps1 deleted file mode 100644 index 4893b80..0000000 --- a/checkout-projects.ps1 +++ /dev/null @@ -1,124 +0,0 @@ -# PowerShell script to checkout arm_am-pom and asset-gui projects - -# 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" -$SVN_BASE_URL_ARM_LIB = "https://svn.armundia.com/svn/PRJarm_am/branches/LIB-JK10" -$WORKSPACE_DIR = "C:\Dev2012\source\WindSurf\adv8" - -# Project paths -$PROJECTS = @{ - "arm_am-pom" = "$SVN_BASE_URL/arm_am-pom" - "asset-gui" = "$SVN_BASE_URL/asset-gui" - "AmazonAWS.S3" = "$SVN_BASE_URL_BW2_LIB/AmazonAWS.S3" - "arm-core-batch" = "$SVN_BASE_URL_ARM_LIB/arm-batch-module" - "arm-core-document" = "$SVN_BASE_URL_BW2_LIB/arm-core-document-ispb" - "arm-core-event" = "$SVN_BASE_URL_BW2_LIB/arm-core-event" - "arm-core-perfo" = "$SVN_BASE_URL_ARM_LIB/arm-perfo-ispb" - "arm-core-print" = "$SVN_BASE_URL/arm-core-print/arm-core-print" - "arm-core-querybuilder" = "$SVN_BASE_URL_ARM_LIB/arm-core-querybuilder" - "arm-core-quest" = "$SVN_BASE_URL/arm-core-quest" - "arm-core-users" = "$SVN_BASE_URL_ARM_LIB/arm-core-users" - "arm-core-utility" = "$SVN_BASE_URL_ARM_LIB/arm-core-utility" - "arm-core-utility-extra" = "$SVN_BASE_URL_ARM_LIB/arm-core-utility-extra" - "arm-core-var" = "$SVN_BASE_URL_ARM_LIB/arm-calcolo-VaR" - "arm-fileExporter" = "$SVN_BASE_URL_ARM_LIB/arm-fileExporter" - "arm-limiti" = "$SVN_BASE_URL_ARM_LIB/arm-limiti" - "arm-quadratore-portafogli" = "$SVN_BASE_URL_ARM_LIB/arm-quadratore-portafogli" - "arm-util" = "$SVN_BASE_URL_ARM_LIB/arm-util" - "aspose-manager" = "$SVN_BASE_URL/arm-core-print/aspose-manager" - "data-quality" = "$SVN_BASE_URL_ARM_LIB/data-quality-default" - "shared-javaEE" = "$SVN_BASE_URL_ARM_LIB/Shared-JavaEE" - } - -# Create workspace directory if it doesn't exist -if (-not (Test-Path $WORKSPACE_DIR)) { - New-Item -ItemType Directory -Path $WORKSPACE_DIR -Force -} - -# Function to checkout or update a project -function Checkout-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 checked out/updated" -ForegroundColor Green - } else { - Write-Host "Error checking out/updating $projectName" -ForegroundColor Red - } -} - -# Store the original directory -$originalDirectory = Get-Location - -try { - # Checkout/update each project - foreach ($project in $PROJECTS.GetEnumerator()) { - Checkout-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 - "aspose-manager" # Document processing - ) - - # Build each project in order - foreach ($project in $BUILD_ORDER) { - Write-Host "Building $project..." -ForegroundColor Yellow - Set-Location (Join-Path $WORKSPACE_DIR $project) - mvn clean install -DskipTests - - if ($LASTEXITCODE -eq 0) { - Write-Host "$project successfully built and installed" -ForegroundColor Green - } else { - Write-Host "Error building $project" -ForegroundColor Red - exit 1 - } - } - -} catch { - Write-Host "An error occurred: $_" -ForegroundColor Red -} finally { - # Restore original directory - Set-Location $originalDirectory -}