# 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