From 693b2de71fe32fc0f095b3422e3a8fc17f72c05e Mon Sep 17 00:00:00 2001 From: Gaetano Savo Date: Mon, 21 Jul 2025 17:02:58 +0200 Subject: [PATCH] Versione IOR --- .gitignore | 2 +- README.md | 68 ++-- build-and-run-asset-gui.ps1 | 25 +- config.json | 2 +- config/standalone-IOR-full.xml | 631 +++++++++++++++++++++++++++++++++ start-jboss.ps1 | 7 +- 6 files changed, 692 insertions(+), 43 deletions(-) create mode 100644 config/standalone-IOR-full.xml diff --git a/.gitignore b/.gitignore index 993ec6b..1dd29a2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ *.log # Project directories -arm_am*/ +arm_am-pom/ asset-gui/ CustomLogFormatter/build.properties CustomLogFormatter/custom-formatter.jar diff --git a/README.md b/README.md index 8cf8f3b..96a9620 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ # 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 + +- voglio scaricare il progetto su +- scarica anche - 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 +- deve usare standalone-IOR-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" @@ -16,26 +17,30 @@ ## Projects Downloaded 1. ARM AM POM Project -``` -svn checkout https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-BES-JB74/arm_am-pom -``` + + ```bash + svn checkout https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-IOR-DEMO-JB74_B2025_VUB/arm_am-pom + ``` 2. Asset GUI Project -``` -svn checkout https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-BES-JB74/asset-gui -``` + + ```bash + svn checkout https://svn.armundia.com/svn/PRJarm_am/branches/ISPBEstero/ADV360-IOR-DEMO-JB74_B2025_VUB/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) @@ -45,21 +50,27 @@ Both projects were checked out at revision 132783. ## 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 +- Uses `standalone-IOR-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 +- Management console available at - 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: @@ -70,33 +81,40 @@ PowerShell script to build and deploy the arm_am-pom project: - 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 +- Development server will be available at ## Build and Deploy Workflow + 1. Start JBoss server: -```powershell -.\start-jboss.ps1 -``` + + ```powershell + .\start-jboss.ps1 + ``` 2. Build and deploy the backend: -```powershell -.\build-and-deploy.ps1 -``` + + ```powershell + .\build-and-deploy.ps1 + ``` 3. Build and run the frontend: -```powershell -.\build-and-run-asset-gui.ps1 -``` + + ```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 + - Check JBoss logs at `C:\Dev2012\BUILDERS\jboss-eap-7.4\standalone\log\server.log` + - Access JBoss admin console at + - Access asset-gui frontend at ## Required Configuration -- JBoss configuration file: `standalone-ADVC-full.xml` must be present in `C:\Dev2012\BUILDERS\jboss-eap-7.4\standalone\configuration\` + +- JBoss configuration file: `standalone-IOR-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-run-asset-gui.ps1 b/build-and-run-asset-gui.ps1 index a22501e..e3a3ac5 100644 --- a/build-and-run-asset-gui.ps1 +++ b/build-and-run-asset-gui.ps1 @@ -14,8 +14,9 @@ if (-not (Test-Path $targetDir)) { New-Item -ItemType Directory -Path $targetDir -Force } -# Change to project directory -Push-Location $projectDir +# Convert to absolute path and change to project directory +$absoluteProjectDir = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot $projectDir)) +Push-Location $absoluteProjectDir try { # Install dependencies @@ -29,24 +30,20 @@ try { # 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 + $releaseDir = Join-Path $absoluteProjectDir "release" + if (Test-Path $releaseDir) { + $absoluteTargetDir = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot $targetDir)) + Copy-Item -Path "$releaseDir\*" -Destination $absoluteTargetDir -Recurse -Force } else { - Write-Host "Error: Release folder not found at .\asset-gui\release" -ForegroundColor Red + Write-Host "Error: Release folder not found at $releaseDir" -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 + # Start development server + Write-Host "Starting development server..." -ForegroundColor Green + gulp watch } finally { # Return to original directory Pop-Location diff --git a/config.json b/config.json index fd76153..ba5fd93 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "deploymentDir": "C:\\Dev2012\\BUILDERS\\jboss-eap-7.4\\standalone\\deployments", "javaHome": "C:\\Dev2012\\BUILDERS\\java\\jdk1.8.0_291", "jboss": { - "configFile": "standalone\\configuration\\standalone-ADVC-full.xml" + "configFile": "standalone-IOR-full.xml" }, "customFormatter": { "src": "src", diff --git a/config/standalone-IOR-full.xml b/config/standalone-IOR-full.xml new file mode 100644 index 0000000..145b6f6 --- /dev/null +++ b/config/standalone-IOR-full.xml @@ -0,0 +1,631 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + h2 + + sa + sa + + + + jdbc:postgresql://postgresql15.armundia.com:5432/bes?currentSchema=advk_own + postgresql + + bes + besBESb3s2023 + + + select 1 + true + 300000 + + + 5 + + + + + org.h2.jdbcx.JdbcDataSource + + + org.postgresql.Driver + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${jboss.bind.address:127.0.0.1} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/start-jboss.ps1 b/start-jboss.ps1 index a8f11d7..5a958d3 100644 --- a/start-jboss.ps1 +++ b/start-jboss.ps1 @@ -34,8 +34,9 @@ $env:NOPAUSE = "true" # Remove this as it might affect logging # $env:LAUNCH_JBOSS_IN_BACKGROUND = "true" -# Set configuration file -$configFile = "standalone-ADVC-full.xml" +# Get configuration file from config.json +$configFile = $config.jboss.configFile +Write-Host "Configuration file path: $configFile" -ForegroundColor Cyan # Copy configuration file from local config directory $sourceConfig = "$PSScriptRoot\config\$configFile" @@ -73,6 +74,8 @@ Write-Host "Starting JBoss with custom JVM options..." -ForegroundColor Yellow Write-Host "JVM Options: $($jvmOpts -join ' ')" -ForegroundColor Gray # Create the command line arguments +$jvmOptsString = $jvmOpts -join ' ' +$env:JAVA_OPTS = $jvmOptsString $cmdArgs = "-c $configFile --debug -b 0.0.0.0 -bmanagement 0.0.0.0" # Start JBoss - Modified to use Start-Process with RedirectStandardOutput