Juan Hernandez has uploaded a new change for review.

Change subject: userportal, webadmin: Deploy as independent .war
......................................................................

userportal, webadmin: Deploy as independent .war

This change moves the user portal and the webadmin out of the .ear, so
that they can be deployed as independent and optional applications.

Change-Id: I312b62ecdbd5703a0866f0ce208c84c2f899386b
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
---
M Makefile
M backend/manager/conf/engine.conf.defaults.in
M ear/pom.xml
D frontend/webadmin/modules/userportal-gwtp/src/main/webapp/META-INF/MANIFEST.MF
A 
frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
A 
frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-web.xml
D frontend/webadmin/modules/webadmin/src/main/webapp/META-INF/MANIFEST.MF
A 
frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
A frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-web.xml
M packaging/fedora/spec/ovirt-engine.spec.in
10 files changed, 89 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/20/13720/1

diff --git a/Makefile b/Makefile
index 0d89c15..e9c7b8e 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,8 @@
 PKG_EAR_DIR=$(DATA_DIR)/engine.ear
 PKG_RESTAPI_DIR=$(DATA_DIR)/restapi.war
 PKG_ROOT_DIR=$(DATA_DIR)/root.war
+PKG_USERPORTAL_DIR=$(DATA_DIR)/userportal.war
+PKG_WEBADMIN_DIR=$(DATA_DIR)/webadmin.war
 PKG_JBOSS_MODULES=$(DATA_DIR)/modules
 PKG_CACHE_DIR=$(LOCALSTATE_DIR)/cache/$(ENGINE_NAME)
 PKG_LOG_DIR=$(LOCALSTATE_DIR)/log/$(ENGINE_NAME)
@@ -251,11 +253,15 @@
        install -dm 755 $(DESTDIR)$(PKG_EAR_DIR)
        install -dm 755 $(DESTDIR)$(PKG_RESTAPI_DIR)
        install -dm 755 $(DESTDIR)$(PKG_ROOT_DIR)
+       install -dm 755 $(DESTDIR)$(PKG_USERPORTAL_DIR)
+       install -dm 755 $(DESTDIR)$(PKG_WEBADMIN_DIR)
        install -dm 755 $(DESTDIR)$(MAVENPOM_DIR)
 
        X=`find "$(MAVEN_OUTPUT_DIR)" -name 
'engine-server-ear-$(POM_VERSION)*'.ear` && unzip -o "$$X" -d 
"$(DESTDIR)$(PKG_EAR_DIR)"
        X=`find "$(MAVEN_OUTPUT_DIR)" -name 
'restapi-webapp-$(POM_VERSION)*'.war` && unzip -o "$$X" -d 
"$(DESTDIR)$(PKG_RESTAPI_DIR)"
        X=`find "$(MAVEN_OUTPUT_DIR)" -name 'root-webapp-$(POM_VERSION)*'.war` 
&& unzip -o "$$X" -d "$(DESTDIR)$(PKG_ROOT_DIR)"
+       X=`find "$(MAVEN_OUTPUT_DIR)" -name 'userportal-$(POM_VERSION)*'.war` 
&& unzip -o "$$X" -d "$(DESTDIR)$(PKG_USERPORTAL_DIR)"
+       X=`find "$(MAVEN_OUTPUT_DIR)" -name 'webadmin-$(POM_VERSION)*'.war` && 
unzip -o "$$X" -d "$(DESTDIR)$(PKG_WEBADMIN_DIR)"
 
        for artifact_id in  $(ARTIFACTS); do \
                POM=`find "$(MAVEN_OUTPUT_DIR)" -name 
"$${artifact_id}-$(POM_VERSION)*.pom"`; \
diff --git a/backend/manager/conf/engine.conf.defaults.in 
b/backend/manager/conf/engine.conf.defaults.in
index e6a40fe..1e16d9c 100644
--- a/backend/manager/conf/engine.conf.defaults.in
+++ b/backend/manager/conf/engine.conf.defaults.in
@@ -94,7 +94,7 @@
 # separated files or directories that should exist under
 # /usr/share/ovirt-engine:
 #
-ENGINE_APPS="engine.ear restapi.war root.war"
+ENGINE_APPS="engine.ear restapi.war root.war userportal.war webadmin.war"
 
 #
 # Flags to enable or disable the web server (the proxy) and the
diff --git a/ear/pom.xml b/ear/pom.xml
index 8b7dc1c..e8c2d58 100644
--- a/ear/pom.xml
+++ b/ear/pom.xml
@@ -57,6 +57,7 @@
       <artifactId>userportal</artifactId>
       <version>${engine.version}</version>
       <type>war</type>
+      <scope>provided</scope>
     </dependency>
 
     <dependency>
@@ -64,6 +65,7 @@
       <artifactId>webadmin</artifactId>
       <version>${engine.version}</version>
       <type>war</type>
+      <scope>provided</scope>
     </dependency>
 
     <!-- ** EJB-JARs -->
@@ -164,21 +166,6 @@
           <displayName>ENGINE</displayName>
 
           <modules>
-            <!-- ** WARs -->
-            <webModule>
-              <groupId>org.ovirt.engine.ui</groupId>
-              <artifactId>userportal</artifactId>
-              <bundleFileName>userportal.war</bundleFileName>
-              <contextRoot>/UserPortal</contextRoot>
-            </webModule>
-
-            <webModule>
-              <groupId>org.ovirt.engine.ui</groupId>
-              <artifactId>webadmin</artifactId>
-              <bundleFileName>webadmin.war</bundleFileName>
-              <contextRoot>/webadmin</contextRoot>
-            </webModule>
-
             <!-- ** EJB-JARs -->
             <ejbModule>
               <groupId>org.ovirt.engine.core</groupId>
@@ -201,8 +188,6 @@
                manifest: -->
           <packagingIncludes>
             beans.jar/**,
-            userportal.war/**,
-            webadmin.war/**,
             META-INF/**,
           </packagingIncludes>
 
@@ -222,6 +207,8 @@
         <earDir>${deploymentsDir}/engine.ear</earDir>
         <restapiDir>${deploymentsDir}/restapi.war</restapiDir>
         <rootDir>${deploymentsDir}/root.war</rootDir>
+        <userportalDir>${deploymentsDir}/userportal.war</userportalDir>
+        <webadminDir>${deploymentsDir}/webadmin.war</webadminDir>
       </properties>
 
       <build>
@@ -359,6 +346,22 @@
                     <touch file="${rootDir}/WEB-INF/web.xml"/>
                     <touch file="${rootDir}.dodeploy"/>
 
+                    <!-- Deploy the user portal .war: -->
+                    <mkdir dir="${userportalDir}"/>
+                    <unzip dest="${userportalDir}">
+                      <fileset refid="org.ovirt.engine.ui:userportal:war"/>
+                    </unzip>
+                    <touch file="${userportalDir}/WEB-INF/web.xml"/>
+                    <touch file="${userportalDir}.dodeploy"/>
+
+                    <!-- Deploy the webadmin .war: -->
+                    <mkdir dir="${webadminDir}"/>
+                    <unzip dest="${webadminDir}">
+                      <fileset refid="org.ovirt.engine.ui:webadmin:war"/>
+                    </unzip>
+                    <touch file="${webadminDir}/WEB-INF/web.xml"/>
+                    <touch file="${webadminDir}.dodeploy"/>
+
                   </tasks>
                 </configuration>
                 <goals>
@@ -375,6 +378,8 @@
                     <delete dir="${earDir}"/>
                     <delete dir="${restapiDir}"/>
                     <delete dir="${rootDir}"/>
+                    <delete dir="${userportalDir}"/>
+                    <delete dir="${webadminDir}"/>
                   </tasks>
                 </configuration>
                 <goals>
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/META-INF/MANIFEST.MF
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/META-INF/MANIFEST.MF
deleted file mode 100644
index 254272e..0000000
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: 
-
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000..3b22c0e
--- /dev/null
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
+
+  <deployment>
+    <dependencies>
+      <module name="org.codehaus.jackson.jackson-core-asl"/>
+      <module name="org.codehaus.jackson.jackson-mapper-asl"/>
+      <module name="org.ovirt.engine.core.common"/>
+      <module name="org.ovirt.engine.core.compat"/>
+      <module name="org.ovirt.engine.core.utils"/>
+    </dependencies>
+  </deployment>
+
+</jboss-deployment-structure>
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-web.xml
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000..bc1afd6
--- /dev/null
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/jboss-web.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-web
+  xmlns="http://www.jboss.com/xml/ns/javaee";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee 
http://www.jboss.org/j2ee/schema/jboss-web_7_1.xsd";
+  version="7.0">
+
+  <context-root>/UserPortal</context-root>
+
+</jboss-web>
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/webapp/META-INF/MANIFEST.MF 
b/frontend/webadmin/modules/webadmin/src/main/webapp/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e94951..0000000
--- a/frontend/webadmin/modules/webadmin/src/main/webapp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path: 
-
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
 
b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000..3b22c0e
--- /dev/null
+++ 
b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
+
+  <deployment>
+    <dependencies>
+      <module name="org.codehaus.jackson.jackson-core-asl"/>
+      <module name="org.codehaus.jackson.jackson-mapper-asl"/>
+      <module name="org.ovirt.engine.core.common"/>
+      <module name="org.ovirt.engine.core.compat"/>
+      <module name="org.ovirt.engine.core.utils"/>
+    </dependencies>
+  </deployment>
+
+</jboss-deployment-structure>
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-web.xml 
b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 0000000..c956a44
--- /dev/null
+++ b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/jboss-web.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-web
+  xmlns="http://www.jboss.com/xml/ns/javaee";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee 
http://www.jboss.org/j2ee/schema/jboss-web_7_1.xsd";
+  version="7.0">
+
+  <context-root>/webadmin</context-root>
+
+</jboss-web>
diff --git a/packaging/fedora/spec/ovirt-engine.spec.in 
b/packaging/fedora/spec/ovirt-engine.spec.in
index 9615d3c..6f28c25 100644
--- a/packaging/fedora/spec/ovirt-engine.spec.in
+++ b/packaging/fedora/spec/ovirt-engine.spec.in
@@ -36,6 +36,8 @@
 # Directories of web applications:
 %global restapi_war %{engine_data}/restapi.war
 %global root_war %{engine_data}/root.war
+%global userportal_war %{engine_data}/userportal.war
+%global webadmin_war %{engine_data}/webadmin.war
 
 # The name and ids of the engine user and group:
 %global engine_user ovirt
@@ -94,6 +96,8 @@
        PKG_EAR_DIR=%{engine_ear} \\\
        PKG_RESTAPI_DIR=%{restapi_war} \\\
        PKG_ROOT_DIR=%{root_war} \\\
+       PKG_USERPORTAL_DIR=%{userportal_war} \\\
+       PKG_WEBADMIN_DIR=%{webadmin_war} \\\
        PKG_PKI_DIR=%{engine_pki} \\\
        PKG_JBOSS_MODULES=%{engine_jboss_modules} \\\
        PKG_CACHE_DIR=%{engine_cache} \\\
@@ -307,8 +311,8 @@
     "%{buildroot}${war_path}/WEB-INF/web.xml"
 done <<'.'
 %{restapi_war}
-%{engine_ear}/userportal.war
-%{engine_ear}/webadmin.war
+%{userportal_war}
+%{webadmin_war}
 .
 
 # Move the jar files to the right directory and replace them with links:
@@ -654,11 +658,11 @@
 
 %files userportal
 %config(noreplace) %{engine_etc}/usbfilter.txt
-%{engine_ear}/userportal.war
+%{userportal_war}
 
 
 %files webadmin-portal
-%{engine_ear}/webadmin.war
+%{webadmin_war}
 
 
 %files tools


--
To view, visit http://gerrit.ovirt.org/13720
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I312b62ecdbd5703a0866f0ce208c84c2f899386b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to