commit b2189e2450c887ebdeb71902395d8c9f50638b8a
Author: Gaetano Savo <g.savo@armudia.com>
Date:   Thu Mar 6 18:18:06 2025 +0100

    Initial commit

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5d7032f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+# Log files
+*.log
+
+# Project directories
+arm_am*/
+asset-gui/
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..13d879c
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,21 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "java",
+            "name": "Current File",
+            "request": "launch",
+            "mainClass": "${file}"
+        },
+        {
+            "type": "java",
+            "name": "Attach to JBoss Remote",
+            "request": "attach",
+            "hostName": "localhost",
+            "port": 8787
+        }
+    ]
+}
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..8cf8f3b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,102 @@
+# SVN Project Checkout Steps
+
+## Richieste
+- voglio scaricare il progetto su https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-BES-JB74/arm_am-pom
+- scarica anche https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-BES-JB74/asset-gui
+- crea un readme con le richieste che ho fatto
+- crea uno script powershell che fa il build ed il deploy di arm_am-pom su C:\Dev2012\BUILDERS\jboss-eap-7.4
+- il pom è nel folder  arm_am-pom
+- java 8 è su C:\Dev2012\BUILDERS\java\jdk1.8.0_291
+- aggiorna il readme
+- deve usare standalone-ADVC-full.xml
+
+- voglio compilare e lanciare il progetto asset-gui
+- jboss deve usare le opzioni "-DIDServer=GS -Dbtf.PathToParse=C:\Dev2012\advc0\in -Djava.awt.headless=true -DFilOptimize=true -DMTH_VALID_JB=internal -DskQueueElab=GS -DskQueueWrite=GS -DmtSession=GS"
+
+## Projects Downloaded
+
+1. ARM AM POM Project
+```
+svn checkout https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-BES-JB74/arm_am-pom
+```
+
+2. Asset GUI Project
+```
+svn checkout https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-BES-JB74/asset-gui
+```
+
+Both projects were checked out at revision 132783.
+
+## Project Structure
+
+### arm_am-pom
+- Java/JEE project containing:
+  - arm_am-ejb: EJB modules and web services
+  - arm_am-jUnit: Test files
+  - Various resources and configuration files
+
+### asset-gui
+- Web application frontend project containing:
+  - Frontend source code in `source` directory
+  - UI libraries (Font Awesome, Bootstrap, amCharts, Roboto fonts)
+  - Environment configurations (LOCAL, VUB, CIB, PBZ, KOPER)
+  - Build configuration files (gulpfile.js, package.json, babel.config.js)
+
+## Build and Deployment Scripts
+
+### start-jboss.ps1
+PowerShell script to start JBoss EAP 7.4 server:
+- Uses Java 8 from `C:\Dev2012\BUILDERS\java\jdk1.8.0_291`
+- Uses `standalone-ADVC-full.xml` configuration
+- Starts JBoss in standalone mode with debug enabled
+- Binds to all interfaces (0.0.0.0)
+- Management console available at http://localhost:9990
+- JBoss logs location: `C:\Dev2012\BUILDERS\jboss-eap-7.4\standalone\log\server.log`
+
+### stop-jboss.ps1
+PowerShell script to stop JBoss EAP 7.4 server:
+- Finds and stops the JBoss process safely
+- Waits to ensure process is fully stopped
+
+### build-and-deploy.ps1
+PowerShell script to build and deploy the arm_am-pom project:
+- Uses Java 8 for building
+- Uses Maven profile `adv360-DEV`
+- Builds modules in correct order:
+  1. Parent POM
+  2. EJB module
+  3. WAR module
+  4. EAR module
+- Deploys the EAR file to JBoss deployment directory
+
+### build-and-run-asset-gui.ps1
+PowerShell script to build and run the asset-gui project:
+- Installs Node.js dependencies (npm install)
+- Builds the project with minification (gulp build --minified)
+- Starts the development server (gulp serve)
+- Development server will be available at http://localhost:3000
+
+## Build and Deploy Workflow
+1. Start JBoss server:
+```powershell
+.\start-jboss.ps1
+```
+
+2. Build and deploy the backend:
+```powershell
+.\build-and-deploy.ps1
+```
+
+3. Build and run the frontend:
+```powershell
+.\build-and-run-asset-gui.ps1
+```
+
+4. Monitor deployment:
+- Check JBoss logs at `C:\Dev2012\BUILDERS\jboss-eap-7.4\standalone\log\server.log`
+- Access JBoss admin console at http://localhost:9990
+- Access asset-gui frontend at http://localhost:3000
+
+## Required Configuration
+- JBoss configuration file: `standalone-ADVC-full.xml` must be present in `C:\Dev2012\BUILDERS\jboss-eap-7.4\standalone\configuration\`
+- Node.js must be installed to build and run asset-gui
diff --git a/build-and-deploy.ps1 b/build-and-deploy.ps1
new file mode 100644
index 0000000..1591336
--- /dev/null
+++ b/build-and-deploy.ps1
@@ -0,0 +1,125 @@
+# PowerShell script for building and deploying arm_am-pom to JBoss EAP 7.4
+
+# Configuration
+$JBOSS_HOME = "C:\Dev2012\BUILDERS\jboss-eap-7.4"
+$PROJECT_DIR = "C:\Dev2012\source\WindSurf\adv\arm_am-pom"
+$DEPLOYMENT_DIR = "$JBOSS_HOME\standalone\deployments"
+$MAVEN_PROFILE = "adv360-DEV"  # Default development profile
+$JAVA_HOME = "C:\Dev2012\BUILDERS\java\jdk1.8.0_291"  # Path to Java 8
+
+# Store the original directory
+$originalDirectory = Get-Location
+
+# Function to check if JBoss is running
+function Is-JBossRunning {
+    $jbossProcess = Get-Process -Name "java" -ErrorAction SilentlyContinue | 
+                    Where-Object { $_.CommandLine -like "*jboss.home.dir=$JBOSS_HOME*" }
+    return $null -ne $jbossProcess
+}
+
+Write-Host "Starting build and deploy process..." -ForegroundColor Green
+
+# Check if Java exists
+if (-not (Test-Path $JAVA_HOME)) {
+    Write-Host "Error: Java 8 not found at $JAVA_HOME" -ForegroundColor Red
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Set JAVA_HOME for the build
+$env:JAVA_HOME = $JAVA_HOME
+Write-Host "Using Java from: $JAVA_HOME" -ForegroundColor Yellow
+
+# Check if JBoss directory exists
+if (-not (Test-Path $JBOSS_HOME)) {
+    Write-Host "Error: JBoss directory not found at $JBOSS_HOME" -ForegroundColor Red
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Check if project directory exists
+if (-not (Test-Path $PROJECT_DIR)) {
+    Write-Host "Error: Project directory not found at $PROJECT_DIR" -ForegroundColor Red
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Navigate to project directory
+Set-Location $PROJECT_DIR
+
+# Clean and build the project with Maven
+Write-Host "Building project with Maven using profile $MAVEN_PROFILE..." -ForegroundColor Yellow
+Write-Host "Current directory: $(Get-Location)" -ForegroundColor Yellow
+
+# First build the parent and modules with debug output
+Write-Host "Building parent POM..." -ForegroundColor Yellow
+& "$env:JAVA_HOME\bin\java" -version
+mvn clean install -N -P$MAVEN_PROFILE -X
+if ($LASTEXITCODE -ne 0) {
+    Write-Host "Maven parent build failed!" -ForegroundColor Red
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Build the EJB module first with debug output
+Write-Host "Building EJB module..." -ForegroundColor Yellow
+Set-Location "$PROJECT_DIR\arm_am-ejb"
+mvn clean install -DskipTests -P$MAVEN_PROFILE -X
+if ($LASTEXITCODE -ne 0) {
+    Write-Host "Maven EJB module build failed!" -ForegroundColor Red
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Build the WAR module with debug output
+Write-Host "Building WAR module..." -ForegroundColor Yellow
+Set-Location "$PROJECT_DIR\arm_am"
+mvn clean install -DskipTests -P$MAVEN_PROFILE -X
+if ($LASTEXITCODE -ne 0) {
+    Write-Host "Maven WAR module build failed!" -ForegroundColor Red
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Finally build the EAR module with debug output
+Write-Host "Building EAR module..." -ForegroundColor Yellow
+Set-Location "$PROJECT_DIR\arm_am-ear"
+mvn clean package -DskipTests -P$MAVEN_PROFILE -X
+if ($LASTEXITCODE -ne 0) {
+    Write-Host "Maven EAR module build failed!" -ForegroundColor Red
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Check if build produced the EAR file
+$earFile = Get-ChildItem -Path "$PROJECT_DIR\arm_am-ear\target\*.ear" -ErrorAction SilentlyContinue | Select-Object -First 1
+
+if (-not $earFile) {
+    Write-Host "Error: EAR file not found after build" -ForegroundColor Red
+    Write-Host "Searching in: $PROJECT_DIR\arm_am-ear\target\" -ForegroundColor Yellow
+    Set-Location $originalDirectory  # Restore original directory
+    exit 1
+}
+
+# Create deployments directory if it doesn't exist
+if (-not (Test-Path $DEPLOYMENT_DIR)) {
+    New-Item -ItemType Directory -Path $DEPLOYMENT_DIR
+}
+
+# Copy EAR file to JBoss deployments directory
+Write-Host "Deploying EAR to JBoss..." -ForegroundColor Yellow
+Write-Host "Copying from: $($earFile.FullName)" -ForegroundColor Yellow
+Write-Host "Copying to: $DEPLOYMENT_DIR" -ForegroundColor Yellow
+Copy-Item $earFile.FullName $DEPLOYMENT_DIR
+
+# Check if JBoss is running
+if (Is-JBossRunning) {
+    Write-Host "JBoss is running - deployment will be automatically picked up" -ForegroundColor Green
+} else {
+    Write-Host "Note: JBoss is not running. Start JBoss to complete deployment" -ForegroundColor Yellow
+}
+
+Write-Host "Build and deploy process completed!" -ForegroundColor Green
+
+# Restore the original directory
+Set-Location $originalDirectory
diff --git a/build-and-run-asset-gui.ps1 b/build-and-run-asset-gui.ps1
new file mode 100644
index 0000000..ca496ad
--- /dev/null
+++ b/build-and-run-asset-gui.ps1
@@ -0,0 +1,50 @@
+# PowerShell script to build and run asset-gui
+
+$projectDir = ".\asset-gui"
+$targetDir = ".\arm_am-pom\arm_am\WebContent\adv"
+
+Write-Host "Building asset-gui project..." -ForegroundColor Green
+
+# Check if target directory exists, create if not
+if (-not (Test-Path $targetDir)) {
+    Write-Host "Creating target directory: $targetDir" -ForegroundColor Yellow
+    New-Item -ItemType Directory -Path $targetDir -Force
+}
+
+# Change to project directory
+Push-Location $projectDir
+
+try {
+    # Install dependencies
+    Write-Host "Installing Node.js dependencies..." -ForegroundColor Yellow
+    npm install
+
+    # Build the project
+    Write-Host "Building the project..." -ForegroundColor Yellow
+    gulp build --minified
+
+    # Copy release folder to target directory
+    Write-Host "Copying release folder to $targetDir..." -ForegroundColor Yellow
+    Pop-Location  # Return to original directory to use relative paths correctly
+    if (Test-Path ".\asset-gui\release") {
+        # Remove existing content in target directory
+        if (Test-Path $targetDir) {
+            Remove-Item -Path "$targetDir\*" -Recurse -Force
+        }
+        # Copy new content
+        Copy-Item -Path ".\asset-gui\release\*" -Destination $targetDir -Recurse -Force
+        Write-Host "Release folder copied successfully!" -ForegroundColor Green
+    } else {
+        Write-Host "Error: Release folder not found at .\asset-gui\release" -ForegroundColor Red
+    }
+
+    # Change back to project directory for serving
+    Push-Location $projectDir
+
+    # Start the development server
+    Write-Host "Starting development server..." -ForegroundColor Yellow
+    gulp serve
+} finally {
+    # Return to original directory
+    Pop-Location
+}
diff --git a/start-jboss.ps1 b/start-jboss.ps1
new file mode 100644
index 0000000..ea257d2
--- /dev/null
+++ b/start-jboss.ps1
@@ -0,0 +1,88 @@
+# PowerShell script to start JBoss EAP 7.4
+
+# Configuration
+$JBOSS_HOME = "C:\Dev2012\BUILDERS\jboss-eap-7.4"
+$JAVA_HOME = "C:\Dev2012\BUILDERS\java\jdk1.8.0_291"
+
+# Function to check if JBoss is already running
+function Is-JBossRunning {
+    $jbossProcess = Get-Process -Name "java" -ErrorAction SilentlyContinue | 
+                    Where-Object { $_.CommandLine -like "*jboss.home.dir=$JBOSS_HOME*" }
+    return $null -ne $jbossProcess
+}
+
+# Check if Java exists
+if (-not (Test-Path $JAVA_HOME)) {
+    Write-Host "Error: Java 8 not found at $JAVA_HOME" -ForegroundColor Red
+    exit 1
+}
+
+# Check if JBoss directory exists
+if (-not (Test-Path $JBOSS_HOME)) {
+    Write-Host "Error: JBoss directory not found at $JBOSS_HOME" -ForegroundColor Red
+    exit 1
+}
+
+# Check if configuration file exists
+$configFile = "$JBOSS_HOME\standalone\configuration\standalone-ADVC-full.xml"
+if (-not (Test-Path $configFile)) {
+    Write-Host "Error: Configuration file not found at $configFile" -ForegroundColor Red
+    exit 1
+}
+
+# Set environment variables
+$env:JAVA_HOME = $JAVA_HOME
+$env:JBOSS_HOME = $JBOSS_HOME
+$env:PATH = "$JAVA_HOME\bin;$env:PATH"
+$env:NOPAUSE = "true"
+$env:LAUNCH_JBOSS_IN_BACKGROUND = "true"
+
+# Check if JBoss is already running
+if (Is-JBossRunning) {
+    Write-Host "JBoss is already running!" -ForegroundColor Yellow
+    exit 0
+}
+
+Write-Host "Starting JBoss EAP 7.4..." -ForegroundColor Green
+Write-Host "Using Java from: $JAVA_HOME" -ForegroundColor Yellow
+Write-Host "JBoss Home: $JBOSS_HOME" -ForegroundColor Yellow
+Write-Host "Using configuration: standalone-ADVC-full.xml" -ForegroundColor Yellow
+
+# Start JBoss in standalone mode
+$startScript = "$JBOSS_HOME\bin\standalone.bat"
+$jvmOptions = @(
+    "-DIDServer=GS",
+    "-Dbtf.PathToParse=C:\Dev2012\advc0\in",
+    "-Djava.awt.headless=true",
+    "-DFilOptimize=true",
+    "-DMTH_VALID_JB=internal",
+    "-DskQueueElab=GS",
+    "-DskQueueWrite=GS",
+    "-DmtSession=GS",
+    "-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
+)
+
+# Add JVM options to JAVA_OPTS
+$env:JAVA_OPTS = "$($jvmOptions -join ' ')"
+
+Write-Host "Starting JBoss with custom JVM options..." -ForegroundColor Green
+Write-Host "JVM Options: $env:JAVA_OPTS" -ForegroundColor Yellow
+Write-Host "Remote debugging enabled on port 8787" -ForegroundColor Cyan
+
+# Create the command line arguments
+$cmdArgs = "-c standalone-ADVC-full.xml --debug -b 0.0.0.0 -bmanagement 0.0.0.0"
+
+# Start JBoss
+Start-Process -FilePath "cmd.exe" -ArgumentList "/c", "set NOPAUSE=true && `"$startScript`" $cmdArgs" -NoNewWindow
+
+# Wait a few seconds to check if the process started successfully
+Start-Sleep -Seconds 10
+
+if (Is-JBossRunning) {
+    Write-Host "JBoss started successfully!" -ForegroundColor Green
+    Write-Host "Admin console will be available at: http://localhost:9990" -ForegroundColor Yellow
+    Write-Host "Remote debugging is enabled on port 8787" -ForegroundColor Cyan
+    Write-Host "Check JBoss logs at: $JBOSS_HOME\standalone\log\server.log" -ForegroundColor Yellow
+} else {
+    Write-Host "Error: JBoss failed to start. Check the logs at: $JBOSS_HOME\standalone\log\server.log" -ForegroundColor Red
+}
diff --git a/stop-jboss.ps1 b/stop-jboss.ps1
new file mode 100644
index 0000000..df6647c
--- /dev/null
+++ b/stop-jboss.ps1
@@ -0,0 +1,21 @@
+# PowerShell script to stop JBoss EAP 7.4
+
+# Configuration
+$JBOSS_HOME = "C:\Dev2012\BUILDERS\jboss-eap-7.4"
+
+Write-Host "Stopping JBoss EAP 7.4..." -ForegroundColor Yellow
+
+# Find and stop JBoss process
+$jbossProcess = Get-Process -Name "java" -ErrorAction SilentlyContinue | 
+                Where-Object { $_.CommandLine -like "*jboss.home.dir=$JBOSS_HOME*" }
+
+if ($jbossProcess) {
+    Write-Host "Found JBoss process (PID: $($jbossProcess.Id))" -ForegroundColor Yellow
+    Stop-Process -Id $jbossProcess.Id -Force
+    Write-Host "JBoss process stopped" -ForegroundColor Green
+} else {
+    Write-Host "No JBoss process found running" -ForegroundColor Yellow
+}
+
+# Wait a moment to ensure process is fully stopped
+Start-Sleep -Seconds 2