From 9864371ee9dac05841ad82506fe3e7b3177bad07 Mon Sep 17 00:00:00 2001
From: ncamera <nico_camera98@hotmail.com>
Date: Mon, 21 Nov 2022 01:12:16 -0300
Subject: [PATCH] Actualizar script generate-war
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

En muchos casos, no se dispone de una instalación de Angular global, es por esto que hay que usar npx antes del comando ng, para que así use la instalación de Angular local del repositorio.
---
 Frontend Angular 4/package.json |  2 +-
 generate-war.sh                 | 18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Frontend Angular 4/package.json b/Frontend Angular 4/package.json
index 4d7d3a53..7bb84b34 100755
--- a/Frontend Angular 4/package.json	
+++ b/Frontend Angular 4/package.json	
@@ -5,7 +5,7 @@
   "scripts": {
     "ng": "ng",
     "start": "ng serve -o --port 0",
-    "build": "ng build",
+    "build": "ng build --configuration production",
     "test": "ng test",
     "lint": "ng lint",
     "e2e": "ng e2e"
diff --git a/generate-war.sh b/generate-war.sh
index 9ff7b728..cd7ae35b 100755
--- a/generate-war.sh
+++ b/generate-war.sh
@@ -1,6 +1,20 @@
-# editar tambien: Frontend\ Angular\ 4/src/app/shared/config.ts
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# Hay que asegurarse que las variables SERVER y GHCI_URL coinciden con la ruta
+# en que se despliegan los servicios. Para ello, editar el archivo
+#    /Frontend\ Angular\ 4/src/app/shared/config.ts
+#
+# Los servicios y la aplicacion se despliegan en la ruta configurada en el tag
+# <context-root> del archivo:
+#   /Frontend/Servidor JEE/WebContent/WEB-INF/jboss-web.xml
+#
+# Hay que asegurarse que el --base-href coincida con la ruta en la que se
+# despliega la aplicacion. En otras palabras, el --base-href y el contenido
+# del tag <context-root> DEBEN COINCIDIR.
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+
 cd Frontend\ Angular\ 4/
-ng build --prod --base-href /proyectos/matefun/
+npx ng build --configuration production --base-href /proyectos/matefun/
 cd ..
 cp -R Frontend\ Angular\ 4/dist/* Servidor\ JEE/WebContent/
 cd Servidor\ JEE/
-- 
GitLab